C-Tran
C-Tran copied to clipboard
'CTranModel' object has no attribute 'module'. Did you mean: 'modules'?
Hi,
I want to run the model by freezing the backbone I am getting the following error in main.py line 56:
'CTranModel' object has no attribute 'module'. Did you mean: 'modules'?
When I change module to modules then I get following error on same line 56 in main.py:
AttributeError: 'function' object has no attribute 'backbone'
Could you please help me regarding this?
Can you share the command line you are using? Are you using GPUs?
Thank you for your reply Yes I am using GPU. I am using following command line:
python3 "/home/ans/CZSL/C-Tran-main/main.py" --batch_size 7 --lr 0.00001 --optim 'adam' --layers 3 --dataset 'mit_states' --grad_ac_step 2 --dataroot data/ --epochs 100 --freeze_backbone
And were you able to run the commands in the README?
Yes I were able to download and run the model on voc20 dataset. Even I am able to run the model on new dataset when I also update the image extractor. However, if I keep the image extractor fixed through --freeze_backbone parameter then this error occurs.
Can you try running without a GPU?
On Wed, Feb 15, 2023 at 3:30 AM ans92 @.***> wrote:
Yes I were able to download and run the model on voc20 dataset. Even I am able to run the model on new dataset when I also update the image extractor. However, if I keep the image extractor fixed through --freeze_backbone parameter then this error occurs.
— Reply to this email directly, view it on GitHub https://github.com/QData/C-Tran/issues/20#issuecomment-1430935491, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJFX7GCIUVFG6VCOIHTVQ3WXSHZPANCNFSM6AAAAAAURD35DI . You are receiving this because you commented.Message ID: @.***>
Yes I have run the model with cpu but error still exists. My torch version is different than listed in requirements.txt file I have 1.13.0+cu117 (torch) and 0.14.0+cu117 (torchvision)
Do you think it is causing this problem?
It could be. I can't replicate the error