Skip to content

Commit 8529a93

Browse files
gonlairostes
andcommitted
Add multiobjective solver and regularized training (#783)
* Add multiobjective solver and regularized training * Add example for multiobjective training * Add jacobian regularizer and SAM * update license headers * add api draft for multiobjective training * add all necessary modules to run the complete xcebra pipeline * add notebooks to reproduce xcebra pipeline * add first working notebook * add notebook with hybrid learning * add notebook with creation of synthetic data * add notebook with hybrid training * add plot with R2 for different parts of the embedding * add new API * update api wrapper with more checks and messages * add tests and notebook with new api * merge xcebra into attribution * separate xcebra dataset from cebra * some minor refactoring of cebra dataset * separate xcebra loader from cebra * remove xcebra distributions from cebra * minor refactoring with distributions * separate xcebra criterions from cebra * minor refactoring on criterion * separate xcebra models/criterions/layers from cebra * refactoring multiobjective * more refactoring... * separate xcebra solvers from cebra * more refactoring * move xcebra to its own package * move more files into xcebra package * more files and remove changes with the registry * remove unncessary import * add folder structure * move back distributions * add missing init * remove wrong init * make loader and dataset run with new imports * making it run! * make attribution run * Run pre-commit * move xcebra repo one level up * update gitignore and add __init__ from data * add init to distributions * add correct init for attribution pacakge * add correct init for model package * fix remaining imports * fix tests * add examples back to xcebra repo * update imports from graphs_xcebra * add setup.py to create a package * update imports of graph_xcebra * update notebooks * Formatting code for submission Co-authored-by: Rodrigo Gonzalez <[email protected]> * move test into xcebra * Add README * move distributions back to main package * clean up examples * adapt tests * Add LICENSE * add train/eval notebook again * add notebook with clean results * rm synthetic data * change name from xcebra to regcl * change names of modules and adapt imports * change name from graphs_xcebra to synthetic_data * Integrate into CEBRA * Fix remaining imports and make notebook runnable * Add dependencies, add version flag * Remove synthetic data files * reset dockerfile, move vmf * apply pre-commit * Update notice * add some docstrings * Apply license headers * add new scd notebook * add notebook with scd --------- Co-authored-by: Steffen Schneider <[email protected]>
1 parent a79c2de commit 8529a93

31 files changed

+3963
-144
lines changed

NOTICE.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,34 @@
3535
- 'tests/**/*.py'
3636
- 'docs/**/*.py'
3737
- 'conda/**/*.yml'
38+
39+
- header: |
40+
Regularized contrastive learning implementation.
41+
42+
Not licensed yet. Distribution for review.
43+
Code will be open-sourced upon publication.
44+
45+
include:
46+
- 'cebra/solver/multiobjective.py'
47+
- 'cebra/solver/regularized.py'
48+
- 'cebra/solver/metrics.py'
49+
- 'cebra/models/multiobjective.py'
50+
- 'cebra/models/multi_criterions.py'
51+
- 'cebra/data/multiobjective.py'
52+
- 'cebra/attribution/*.py'
53+
- 'tests/test_multiobjective.py'
54+
55+
- header: |
56+
Copyright (c) Facebook, Inc. and its affiliates.
57+
58+
This source code is licensed under the MIT license found in the
59+
LICENSE file in the root directory of this source tree.
60+
61+
PyTorch implementation of Jacobian regularization described in [1].
62+
63+
[1] Judy Hoffman, Daniel A. Roberts, and Sho Yaida,
64+
"Robust Learning with Jacobian Regularization," 2019.
65+
[arxiv:1908.02729](https://arxiv.org/abs/1908.02729)
66+
67+
include:
68+
- 'cebra/models/jacobian_regularizer.py'

cebra/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666

6767
import cebra.integrations.sklearn as sklearn
6868

69-
__version__ = "0.4.0"
69+
__version__ = "0.4.0+regcl"
7070
__all__ = ["CEBRA"]
7171
__allow_lazy_imports = False
7272
__lazy_imports = {}

cebra/attribution/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Regularized contrastive learning implementation.
3+
#
4+
# Not licensed yet. Distribution for review.
5+
# Code will be open-sourced upon publication.
6+
#
7+
import cebra.registry
8+
9+
cebra.registry.add_helper_functions(__name__)
10+
11+
from cebra.attribution.attribution_models import *
12+
from cebra.attribution.jacobian_attribution import *
13+
from cebra.attribution.jacobian import *

0 commit comments

Comments
 (0)