question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Unable to pretrain a model with dataset twice

See original GitHub issue

Describe the bug

ValueError: Variable pretrain/model/pi_fc0/w/Adam/ already exists , disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at: File “/usr/local/lib/python3.6/dist-packages/stable_baselines/common/base_class.py”, line 266, in pretrain optim_op = optimizer.minimize(loss, var_list=self.params)

Code example

model.pretrain(dataset, n_epochs=10)
# some code that changes values in the dataset
model.pretrain(dataset, n_epochs=10)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
araffincommented, Nov 3, 2019

Hello,

Thanks for reporting the issue, looks like a bug (I could reproduce it). I don’t have the time now to fix it, so we would appreciate if you could submit a PR that solves this issue 😉

0reactions
Miffylicommented, Nov 12, 2021

@lorepieri8

Double-check that you have installed the newest version of stable-baselines (preferably with pip install git+https://github.com/hill-a/stable-baselines)

Read more comments on GitHub >

github_iconTop Results From Across the Web

What to do when you get an error - Hugging Face Course
In this section we'll look at some common errors that can occur when you're trying to generate predictions from your freshly tuned Transformer...
Read more >
deeplab Restoring from checkpoint failed when training on ...
I got rid of the error by changing the pretrained weights. It worked with this model: mobilenetv2_coco_voc_trainval.
Read more >
37 Reasons why your Neural Network is not working - Slav
If finetuning a model, double check the preprocessing, for it should be the same as the original model's training.
Read more >
37 Reasons why your Neural Network is not working
I. Dataset issues · 1. Check your input data · 2. Try random input · 3. Check the data loader · 4. Make...
Read more >
Just Train Twice: Improving Group Robustness without ... - arXiv
Train Twice), for improving the worst-group error without training group annotations, instead only ... identifying examples from groups that ERM models fail.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found