Comments (7)
Hey @FloLins so I think in order to actually resume training, you need to also load the non-swag checkpoint with the resume
flag: https://github.com/wjmaddox/swa_gaussian/blob/master/experiments/train/run_swag.py#L243-L248 this part loads the optimizer and the base model parameters. Do you have a regular checkpoint or just the SWAG one?
from swa_gaussian.
Can you just remove that flag in the code?
from swa_gaussian.
Thanks for your reply.
I changed the code to:
swag_model = SWAG(
model_cfg.base,
no_cov_mat=args.no_cov_mat,
max_num_models=args.max_num_models,
#loading=True, #Now the Flag is removed
*model_cfg.args,
num_classes=num_classes,
**model_cfg.kwargs
)
This does omit the error, but the training just started from epoch one and the SWAG checkpoint is not loaded.
Loading a non SWAG training Checkpoint is still possible.
from swa_gaussian.
Hey @izmailovpavel I already tried that.
In your paper you use 300 epochs of training. (160 till local minima and 140 SWAG training)
I loaded the normal checkpoint from 160 and from 200 and observed the accuracy and final results.
The run loaded from 160 has a higher accuracy as the run loaded from 200.
It seems that the algorithm just starts SWAG training from beginning instead of loading SWAG parameters and continuing SWAG training.
Does this load the SWAG Parameters too?
https://github.com/wjmaddox/swa_gaussian/blob/master/experiments/train/run_swag.py#L243-L248
from swa_gaussian.
Hey @FloLins you have to use both resume
and swa_resume
to load both the base model / optimizer and the swag model. Sorry for the confusion.
from swa_gaussian.
Hey @izmailovpavel I tried that too before opening this issue, and it didn't work due to the "loading=True" flag
If I comment this flag out (line 261 in run_swag.py) like @wjmaddox suggested and use both parameters "resume" and "swa_resume" it works fine!
Will any other functionality broke down, if I keep this flag commented out?
Thanks for all your help and have a nice day,
Yours sincerely,
Florian Linsner
from swa_gaussian.
Hi @FloLins, glad that it worked!
I think you could even completely remove these lines: https://github.com/wjmaddox/swa_gaussian/blob/master/experiments/train/run_swag.py#L252-L260.
I don't remember why we had the loading
parameter, but I don't think it's used anywhere.
from swa_gaussian.
Related Issues (20)
- Replicating results from paper with dropout HOT 4
- Running on CPU HOT 2
- Replicating results of transfer learning and out-of-domain image detection HOT 3
- Could you share the pretrained model for imagenet? HOT 4
- Cannot find key 'n_models' HOT 1
- Question about KFACLaplace for BatchNorm
- Error with CUDA10 HOT 5
- Questions about the plotting of relability diagrams HOT 5
- Questions about the implementation of calculation of Low-Rank Covariance Matrix HOT 2
- Non-Reproducible / Weird Uncertainty Results HOT 1
- Results CSV
- RMSE UCI Regression Results Paper
- Reproducing UCI Regression Experiments
- Sampling using SWAG HOT 2
- reliability diagrams HOT 7
- Cannot understand result HOT 1
- Why BN Update is not used for other methods like SGD HOT 5
- Reproducibility of Uncertainty Experiment HOT 2
- 'CIFAR10' object has no attribute 'targets' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swa_gaussian.