'DRAW' object has no attribute 'module'
Closed this issue · 1 comments
Oros42 commented
When I run run-draw.py, I got this :
$ python3 run-draw.py
/home/user/.local/lib/python3.6/site-packages/torch/nn/functional.py:52: UserWarning: size_average and reduce args will be deprecated, please use reduction='none' instead.
warnings.warn(warning.format(ret))
0%| | 0/938 [00:00<?, ?it/s]/home/user/.local/lib/python3.6/site-packages/torch/nn/functional.py:1006: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")
100%|███████████████████████████████████████████████████████████████████████████████| 938/938 [00:38<00:00, 24.67it/s]
Loss at step 0: 118.76319122314453
Traceback (most recent call last):
File "run-draw.py", line 70, in <module>
x_sample = model.module.sample(args.batch_size)
File "/home/user/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 518, in __getattr__
type(self).__name__, name))
AttributeError: 'DRAW' object has no attribute 'module'
Does I failed to setup something ?
wohlert commented
I think it is because you are running a newer version of PyTorch. You can either choose to set DataParallel=True
or change line 70 to just x_samples = model.sample(args.batch-size)
.