Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get attribute 'Identity' on <module 'efficientnet_pytorch.utils' #62

Open
waghts95 opened this issue Aug 26, 2020 · 4 comments
Open

Comments

@waghts95
Copy link

Hi, I am using 4_efficientnet module, please let me know how can I deal with this error.

AttributeError Traceback (most recent call last)
in ()
2 gtf = Infer()
3 #our trained model weights are in here in onxx format
----> 4 gtf.Model(model_dir="model/")

2 frames
/usr/local/lib/python3.6/dist-packages/torch/serialization.py in _load(zip_file, map_location, pickle_module, **pickle_load_args)
840 unpickler = pickle_module.Unpickler(data_file, **pickle_load_args)
841 unpickler.persistent_load = persistent_load
--> 842 result = unpickler.load()
843
844 return result

AttributeError: Can't get attribute 'Identity' on <module 'efficientnet_pytorch.utils' from '/usr/local/lib/python3.6/dist-packages/efficientnet_pytorch/utils.py'>

@abhi-kumar
Copy link
Contributor

A solution to this error has just been added to requirements file. Install efficientnet_pytorch==0.6.3. Latest efficientnet_pytorch version 0.7 has backward compatibility issues. original efficientnet pytorch's pip version was updated last night.

@mahavir-GPI
Copy link

@abhi-kumar has this been resolved? Can you please outline what exact versions do we need. I am using 0.6.3 of efficient det, 1.4 of pytorch , 0.5 of torchvision and still facing this issue.

@mahavir-GPI
Copy link

mahavir-GPI commented Oct 13, 2020

For anyone on colab, please try the following packages, it works for me:

mxnet-cu101
torch==1.4
torchvision==0.5
tensorboardX
efficientnet_pytorch==0.6.3

@abhi-kumar I think the colab requirements file can be updated with these versions.

@sagarbhalke888
Copy link

efficientnet_pytorch==0.6.3
Thank you very much , You saved my day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants