alexrame / diwa Goto Github PK
View Code? Open in Web Editor NEWDiWA: Diverse Weight Averaging for Out-of-Distribution Generalization
License: Apache License 2.0
DiWA: Diverse Weight Averaging for Out-of-Distribution Generalization
License: Apache License 2.0
Hi,
Thank you for sharing the code.
When I was using your code, I think I found some problems. In the code here, you try to get all the env{i}_out_Accuracies/acc_net
. It was called here.
I think there is no such metric in the results, and the logic here is not right. If my test_env=0
, then after first iteration, the for loop will break, and fails to collect the rest env_i_acc
.
Can you take a look at it?
Best regards.
In datasets files datasets classes define enviroment as a list by in the script file it is an integer.
also i used test_env =0 , trial_seed =0 with the default training code on OfficeHome and got accuracy arrpython -m scripts.diwa --data_dir=/input/domainbed/ --output_dir=sweep_output --dataset OfficeHome --test_env 0 --weight_selection uniform --trial_seed 0ound 67% .
I used the following commands:
python -m scripts.train --algorithm ERM --dataset OfficeHome --test_env 0 --init_step --path_for_init init_checkpoint.pth
follown by:
python -m scripts.sweep launch --data_dir /input/domainbed/ --output_dir sweep_output --command_launcher multi_gpu --datasets OfficeHome --test_env 0 --path_for_init init_checkpoint.pth --algorithms ERM --n_hparams 20 --n_trials 3
and
python -m scripts.diwa --data_dir=/input/domainbed/ --output_dir=sweep_output --dataset OfficeHome --test_env 0 --weight_selection uniform --trial_seed 0
Maybe that is due to my computer, but i am wondering if i am using the exact setting in the right way.
What is the role of the variable --test_env ${test_env}
what are the possible values of test_env and their meaning?
thank you
EOFError: Compressed file ended before the end-of-stream marker was reached
Hello.
In
python3 -m domainbed.scripts.train\ --data_dir=/my/data/dir/\ --algorithm ERM\ --dataset OfficeHome\ --test_env ${test_env}\ --init_step\ --path_for_init ${path_for_init}\ --steps ${steps}\
you said that if
random initialization, set steps to -1: there will be no training.
Linear Probing, ICLR2022, set steps to 0: only the classifier will be trained.
However, i could not find that part in the code.
what i saw is if init_step=0 train everithing elif int_step=-1 training classifier head only in algorithm.py from line 109 to 113.
also if step=-1 in line 201 n_steps will be set to -1 in (n_steps = args.steps or dataset.N_STEPS)
could you correct me
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.