You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to run the "Cat to Tiger Translation" test with python cocogan_translate_one_image.py --config ../exps/unit/cat2tiger.yaml --a2b 1 --weights ../outputs/unit/cat2tiger/cat2tiger_gen_00500000.pkl --image_name ../images/cat001.jpg --output_image_name ../results/cat2tiger_cat001.jpg and get the following error:
AttributeError: 'list' object has no attribute 'gen'
The code was tested in Python2. I actually don't know what could be the issues in Python3.
But I think you might be able to fix the error by commenting out
trainer = []
in L42 of cocogan_translate_one_image.py
Hi,
I am trying to run the "Cat to Tiger Translation" test with
python cocogan_translate_one_image.py --config ../exps/unit/cat2tiger.yaml --a2b 1 --weights ../outputs/unit/cat2tiger/cat2tiger_gen_00500000.pkl --image_name ../images/cat001.jpg --output_image_name ../results/cat2tiger_cat001.jpg
and get the following error:AttributeError: 'list' object has no attribute 'gen'
By inspecting the source code in
cocogan_translate_one_image.py:42
(https://github.com/mingyuliutw/UNIT/blob/master/src/cocogan_translate_one_image.py#L42) I find that trainer is here indeed first defined as as list. Theexec
command in the next line seems to turn this into a dict (?) so it seems that this is the source of the error.What to do? (I am using Python3)
Thx
The text was updated successfully, but these errors were encountered: