PPPW / deep-learning-random-explore

194 stars 34 forks source link

name 'arch_summary' is not defined #9

Closed Light-- closed 5 years ago

Light-- commented 5 years ago

my code in jupyter notebook:

from torchvision.models import *
import pretrainedmodels

from fastai.vision import *
from fastai.vision.models import *
from fastai.vision.learner import model_meta

from utils import *
import sys

def se_resnet50(pretrained=False):
    pretrained = 'imagenet' if pretrained else None
    model = pretrainedmodels.se_resnet50(pretrained=pretrained)
    return model

arch_summary(se_resnet50)

got the error below:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-72-da671789676a> in <module>
     14     return model
     15 
---> 16 arch_summary(se_resnet50)

NameError: name 'arch_summary' is not defined
PPPW commented 5 years ago

Hi @Light--,

arch_summary is defined in utils.py, do you have that file in your path? It's not a fastai function (same for get_groups FakeData).

Light-- commented 5 years ago

Hi @Light--,

arch_summary is defined in utils.py, do you have that file in your path? It's not a fastai function (same for get_groups FakeData).

oh, i see. i thought was the utils module which i have installed. haha, thanks!