GithubHelp home page GithubHelp logo

otfusion's People

Contributors

modelfusion avatar sidak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

otfusion's Issues

Parameters for split_main.py

Referring to section S5 of the paper: where can I find the parameters for replicating skill transfer experiments?

How to run resnet example?

Dear Sidak,
Thanks again for your code. I was going to run your an example using your resnet checkpoints.
To do this, cifar.zip and resnet_models.zip are extracted and the following command is run (it seems the provided checkpoint are with no BN):

python main.py --gpu-id 0 --model-name resnet18_nobias_nobn --n-epochs 300 --save-result-file sample.csv --sweep-name exp_sample --exact --correction --ground-metric euclidean --weight-stats --activation-histograms --activation-mode raw --geom-ensemble-type acts --sweep-id 21 --act-num-samples 200 --ground-metric-normalize none --activation-seed 21 --prelu-acts --recheck-acc --load-models ./resnet_models/ --ckpt-type best --past-correction --not-squared --dataset Cifar10

However, the code exited with the following error (seems the shortcut is making the trouble):

--------------- At layer index 7 ------------- 
 
Previous layer shape is  torch.Size([128, 128, 3, 3])
let's see the difference in layer names layer2.0.shortcut.0 layer2.0.shortcut.0
torch.Size([200, 1, 128, 16, 16]) shape of activations generally
reorder_dim is  [1, 2, 3, 0]
In layer layer2.0.shortcut.0.weight: getting activation distance statistics
Statistics of the distance from neurons of layer 1 (averaged across nodes of layer 0):
Statistics of the distance from neurons of layer 1 (averaged across nodes of layer 0): 

Max : 8.675606727600098, Mean : 3.544717311859131, Min : 1.0014023780822754, Std: 1.3794620037078857
shape of layer: model 0 torch.Size([128, 64, 1])
shape of layer: model 1 torch.Size([128, 64, 1])
shape of activations: model 0 torch.Size([128, 16, 16, 200])
shape of activations: model 1 torch.Size([128, 16, 16, 200])
shape of previous transport map torch.Size([128, 128])
Traceback (most recent call last):
  File "main.py", line 159, in <module>
    geometric_acc, geometric_model = wasserstein_ensemble.geometric_ensembling_modularized(args, models, train_loader, test_loader, activations)
  File "/home/rahim/NIPS2021/otfusion/wasserstein_ensemble.py", line 893, in geometric_ensembling_modularized
    avg_aligned_layers = get_acts_wassersteinized_layers_modularized(args, networks, activations, train_loader=train_loader, test_loader=test_loader)
  File "/home/rahim/NIPS2021/otfusion/wasserstein_ensemble.py", line 688, in get_acts_wassersteinized_layers_modularized
    aligned_wt = torch.bmm(fc_layer0_weight_data.permute(2, 0, 1), T_var_conv).permute(1, 2, 0)
RuntimeError: batch1 dim 2 must match batch2 dim 1

Secondly, the code is not working with BatchNorm, is that right?

Where is module 'train'

In utils.py line 11, import train as cifar_train. Where is the module 'train'? Thank you!

no module named 'train'

Hi Sidak,
Thanks for such great work and your code. I tried to run one of the samples codes in the readme, but it seems that a ''train' folder is missing. The error prints as "No module named 'train'".

How were the two models being created?

Hi, Sidak. My name is Terai, and I am an undergraduate student studying informatics engineering.

I have read your paper (titled as Model Fusion via Optimal Transport) published on NIPS'20. After reading through the paper, I have tried to reproduce the simulation results using the codes publicly available on GitHub, but I have two simple questions: How were the two models (used in Figure 2 of the paper) being created? How can I leverage your codes to retrain the models by myself?

I know you are busy, but I would greatly appreciate it if you could help me. Thanks.

How to transport or fuse between two biases?

Hi expert,
Nice work and novel view to use OT method.
As you mentioned on your paper "The bias of a neuron is set to zero in all of the experiments. It is possible to handle
it as a regular weight by keeping the corresponding input as 1" .
Do you have any new version to handle fusion of bias over this years?
Or How to do a regular weight by keeping the corresponding input as 1?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.