fsdl-text-recognizer-2021-labs
fsdl-text-recognizer-2021-labs copied to clipboard
Lab 7: AttributeError: 'IAMParagraphs' object has no attribute 'data_test'
When running Lab 7
PYTHONPATH=. python training/run_experiment.py --wandb --gpus=-1 --data_class=IAMOriginalAndSyntheticParagraphs --model_class=ResnetTransformer --loss=transformer --batch_size=16 --check_val_every_n_epoch=10 --terminate_on_nan=1 --num_workers=32 --accelerator=ddp --lr=0.001 --accumulate_grad_batches=4 --max_epoch 1
I get the following error:
File "/home/ubuntu/pytorch-lab/lab7_eds/text_recognizer/data/iam_original_and_synthetic_paragraphs.py", line 39, in setup
self.data_test = self.iam_paragraphs.data_test
AttributeError: 'IAMParagraphs' object has no attribute 'data_test'
has anyone else seen it?
Have you been able to follow along this lab? I tried to change this line into the following:
if stage == 'test' or stage is None:
self.data_test = self.iam_paragraphs.data_test
Have you been able to follow along this lab?... I think that I did, but I think that I didn't run with the option
--data_class=IAMOriginalAndSyntheticParagraphs... what I can't really remember as it was a while ago.
Although I haven't tried your fix, I was thinking a fix along those lines when I encountered the error. Sadly, I never got around to a working solution. Hence, if it worked for you, I guess that it would for me as well. Hence, why don't you PR it?~
Thank you!