AttributeError: ‘DenseLayer‘ object has no attribute ‘memory_efficient‘

 (Record only)

1.问题:AttributeError: 'DenseLayer' object has no attribute 'memory_efficient'

2.Reference:

1)https://www.kaggle.com/questions-and-answers/104944  The torchvision version used in training and prediction caused by differences. That means it's still a version issue. . .

2)Issues with densenet model - #4 by mailcorahul - vision - PyTorch Forums

In this link:Statement 1: The torchvision version is a bit old and the torchvision version needs to be updated (I should not be in this category, my torchvision The version is quite new.);Statement 2: torchvision0.2.0 is required.

 

3)Python: Hey guys, I'm getting this error 'AttributeError: '_DenseLayer...

 I want to run the code from the old version of pytroch (training model) on the current version of pytorch, but something went wrong. Others suggested: Create a new virtual environment and install the correct pytorch version.

 

3. Solve:

1) Install torchvision0.2.0 and give it a try.

2) Or, re-create the virtual environment and install the same pytorch version as when training the model.

It seems there is no other good way...

Guess you like

Origin blog.csdn.net/weixin_39450145/article/details/125706014