Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have met this error when run train.py #1

Open
bemoregt opened this issue Jan 25, 2018 · 2 comments
Open

I have met this error when run train.py #1

bemoregt opened this issue Jan 25, 2018 · 2 comments

Comments

@bemoregt
Copy link

bemoregt commented Jan 25, 2018

Hi, @oyxhust

I have met this error when train time.

model [WGAN_GP_Model] was created
create web directory ./checkpoints/mnist/web...
Traceback (most recent call last):
File "train.py", line 34, in
model.optimize_parameters(only_update_D)
File "/Users/kerbal/wgan-gp-anomaly/models/wgan_gp_model.py", line 153, in optimize_parameters
self.update_D()
File "/Users/kerbal/wgan-gp-anomaly/models/wgan_gp_model.py", line 99, in update_D
self.real_data_v = Variable(real_data)
UnboundLocalError: local variable 'real_data' referenced before assignment

My Command:
$ python3 train.py --dataroot ./datasets/MNIST/ --name mnist --gpu_ids -1 --no_flip

What's wrong with me?

MacOSX High Sierra, CPU Only, Python3.6, PyTorch 0.3.x

Thanks in advance.

@bemoregt
Copy link
Author

Hi, @oyxhust

I fixed it using CUDA machine.

@ZhuFeii
Copy link

ZhuFeii commented May 9, 2020

Hi,@bemoregt
I encountered the same situation as you. Could you explain how to fix it, pls ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants