You might be using an older version of torchvision models - ‘memory_efficient’ attribute is present only in densenet(reason why you were able to run resnets) and I guess this might be introduced in the newer versions of torchvision.
Do
pip install --upgrade torchvision
This should solve the issue. Also it would be better if you rename the title to something more specific to the problem