mm-cot
mm-cot copied to clipboard
ImportError: cannot import name 'Conv2dSame' from 'timm.models.layers' (unknown location)
When I run the script extract_features.py
, I encountered the following error:
ImportError: cannot import name 'Conv2dSame' from 'timm.models.layers' (unknown location)
My Python version is 3.9.12. Do I need to use Python 3.8 or 3.7 instead?"
Hi, Thanks for the great work, I was trying to check how this code works. I am also facing same. Can you please share files in layers directory and others those are required to run that code and currently those are not uploaded in git. Thanks
raceback (most recent call last):
File "...\mm-cot-scienceqa\extract_features.py", line 4, in
File "...\mm-cot-scienceqa\timm\models_init_.py", line 1, in
I downloaded the files in layers directory from https://github.com/huggingface/pytorch-image-models/tree/main/timm/layers and substituted the corresponding directory of 'mm-cot/timm/models/layers', which solved the ImportError.
Thanks, this solve the issue.
On Mon, Oct 9, 2023 at 12:14 PM Zhimin00 @.***> wrote:
I downloaded the files in layers directory from https://github.com/huggingface/pytorch-image-models/tree/main/timm/layers and substituted the corresponding directory of 'mm-cot/timm/models/layers', which solved the ImportError.
— Reply to this email directly, view it on GitHub https://github.com/amazon-science/mm-cot/issues/61#issuecomment-1752426517, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANHWSSMKRVQT67LFOM6D6A3X6OMOVAVCNFSM6AAAAAA4565RF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGQZDMNJRG4 . You are receiving this because you commented.Message ID: @.***>
ImportError: cannot import name 'convert_norm_act' from 'timm.models.layers' Do you have such a question
ImportError: cannot import name 'convert_norm_act' from 'timm.models.layers' Do you have such a question
I downloaded the files from https://github.com/huggingface/pytorch-image-models/ and Replace the entire timm folder.
It works for me