-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Major update #25
Open
franckma31
wants to merge
98
commits into
master
Choose a base branch
from
develop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Major update #25
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note that black hook was broken, requiring the update for this hook. In the meantime, other hooks were updated too. Moreover, some other files did not pass the "trailing spaces" hook. They were fixed.
NumPy<1.22.0 has a vulnerability (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34141). This is an opportunity to remove the dependency to a specific version and to fetch the latest NumPy version.
Update versions (requirements, tox, pre-commit hooks) Versions of packages in multiple files have been updated: - NumPy 1.19.5 has a vulnerability and must be avoided (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34141). The fixed version in requirements.txt is then removed to fetch the latest NumPy version. - The tox virtual environments were fetching different torch/torchvision versions from the ones in requirements.txt. These versions are now aligned in both files to torch==1.10.2+cu113 and torchvision==0.11.3+cu113. - The pre-commit hooks have been updated to retrieve the latest versions up to date. Note that black hook 21.6b0 was broken: an update was mandatory.
A new parameter is introduced in FrobeniusLinear to handle multiple output neurons. If disjoint_neurons is True, each output neuron is 1-Lipschitz, imitating multiple networks with a single output. If disjoint_neurons is False, a Frobenius normalization is performed on the whole matrix weight.
New parameter "disjoint_neurons" in FrobeniusLinear So far, the FrobeniusLinear layer was offered to replace SpectralLinear when only one output neuron is used. In this PR, a new parameter disjoint_neurons is introduced in FrobeniusLinear to handle multiple output neurons (like in deel-lip library): - If disjoint_neurons = True, each output neuron is 1-Lipschitz. It is equivalent to have multiple networks with a single output neuron. - If disjoint_neurons = False, a Frobenius normalization is performed on the whole matrix weight.
Keep the layer names when vanilla exporting
It does not depends on input shape anymore
remove useless summary
…fle; modify pytest (warning only support 2D inputs, and single value kernel size)
…me change Global to Adaptative
Add several new layers to be able to support Resnet like architectures
Updated version to 1.0
cofri
approved these changes
Jan 24, 2025
Deprecated spectral_ and bjorck_ initialization Update to remove deprecated function for initialization
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Major revision 1.0
Update parametrization with register_parametrization (replacing hook)
Unit testing update and common with deel-lip
Add new layers to support resnet like 1-Lipschitz NN
Add multiclass losses
Normalizers (Spectral and Bjorck): Updated with a stopping criterion based on an epsilon value (eps) rather than a fixed number of iterations
Bjorck parenthesis trick added (reduce computational complexity)
A new parameter disjoint_neurons is introduced in FrobeniusLinear to handle multiple output neurons (like in deel-lip library)