Monk_Object_Detection icon indicating copy to clipboard operation
Monk_Object_Detection copied to clipboard

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

Open waghts95 opened this issue 5 years ago • 4 comments

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'>

waghts95 avatar Aug 26 '20 09:08 waghts95

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.

abhi-kumar avatar Aug 26 '20 09:08 abhi-kumar

@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 avatar Oct 13 '20 19:10 mahavir-GPI

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.

mahavir-GPI avatar Oct 13 '20 19:10 mahavir-GPI

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

sagarbhalke888 avatar Oct 27 '20 10:10 sagarbhalke888