Skip to content

Variable reuse issue with wide resnet model training script in autoaugment/train_cifar.py #8899

@preethiseshadri518

Description

@preethiseshadri518

I am trying to train a wide resnet model for CIFAR10 using the models/research/autoaugment/train_cifar.py directory. I just copied over all the necessary files to train a CIFAR10 model and created a local repository. Since this requires Python 2 and Tensorflow 1, I am running the code with tensorflow 1.15 and python 2.7.6. I am using MacOS and CPU.

To train a wrn model, I run the following (I haven't modified the original code):

python train_cifar.py --model_name=wrn \
                      --checkpoint_dir=training \
                      --data_path=data \
                      --dataset='cifar10' \
                      --use_cpu=1

However, when I run this, I get the following error:
ValueError: Variable model/init/init_conv/weights already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope?

I've included screenshots so you can see the entire traceback. The issue appears to be with custom_ops.py and reusing variables. I am not super familiar with tensorflow and gravitate towards use keras, so I'm not sure how to fix this issue and where any changes should be made. Thank you!

Screen Shot 2020-07-17 at 10 52 02 AM

Screen Shot 2020-07-17 at 10 52 12 AM

Also, this is my first time submitting an issue so apologies if I did not follow the guidelines completely and would welcome any feedback. I did not see any other issues filed about variable reuse for the cifar10/wide resnet training script.

Metadata

Metadata

Assignees

Labels

models:researchmodels that come under research directorytype:bugBug in the code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions