TheShadow29 / FAI-notes

Some notes, tutorials, and some experimentation with the fast.ai library (https://github.com/fastai/fastai)
58 stars 15 forks source link

no ConvLearner in fastai 1.0 #3

Open austinmw opened 5 years ago

austinmw commented 5 years ago

Hi, I'm trying to get cadene models working with fastai 1.0, but it seems there's no longer a ConvLearner. I've got some models working with create_cnn, but others fail. For example resnet18 works, but alexnet doesn't.

data = ImageDataBunch.from_name_re(path_img, fnames, pat, ds_tfms=get_transforms(),
                                   size=224, bs=64).normalize(imagenet_stats)
model_name = 'resnet18'
model = pretrainedmodels.__dict__[model_name](pretrained=None)
learn = create_cnn(data, lambda x: model, metrics=error_rate)

My main goal is to create a fastai Learner that does not use adaptive pooling so I can do graph optimizations on it (SageMaker Neo doesn't support pytorch adaptive pooling layers). Any idea how I may be able to get this to work?

TheShadow29 commented 5 years ago

Hi. Unfortunately, this repo uses fastai v0.7 and not fastai v1. Might be best to ask in the forums https://forums.fast.ai/