Assertion error in losses/vqperceptual.py
Wonder1905 opened this issue · 2 comments
Hi, I'm trying to run the code, I cloned the repo, downloaded the data preprocess as written in the readme, and tried to run this command:
python main.py --base configs/ocr-vqgan-imagenet-16384.yaml --logdir path_to_logdir -t --gpus 0, -p project_name
I tried also using: ocr-vqgan-f16-c16384-d256.yaml.
But I'm getting this error:
File "/workspace/ocr-vqgan/ocr_vqgan_env/lib/python3.8/site-packages/pytorch_lightning/overrides/base.py", line 82, in forward output = self.module.training_step(*inputs, **kwargs) File "/workspace/ocr-vqgan/taming/models/vqgan.py", line 94, in training_step aeloss, log_dict_ae = self.loss(qloss, x, xrec, optimizer_idx, self.global_step, File "/workspace/ocr-vqgan/ocr_vqgan_env/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/workspace/ocr-vqgan/taming/modules/losses/vqperceptual.py", line 222, in forward assert not self.training AssertionError
It's important to note that I changed two things in the configs, the first is the data path, as requested. Furthermore I changed the image size to 256 due to memory issues.
Any idea what am I missing??
Hi @BattashB
Your changes in config seem to be correct. However I cannot reproduce your error.
I assume your execution is failing in this operation
. I would suggest debugging until that line and see what is happening. Please share your progress!Joan
@BattashB did you manage to fix the issue?
Thanks
Joan