Giter Club home page Giter Club logo

Comments (5)

jakubLangr avatar jakubLangr commented on May 16, 2024

Actually it was just me being stupid—just re-define all the functions that are assumed by your model.

from fastai2.

muellerzr avatar muellerzr commented on May 16, 2024

Yes. We actually go over that once we hit lesson 5 in the study group :)

from fastai2.

nikky4D avatar nikky4D commented on May 16, 2024

Actually it was just me being stupid—just re-define all the functions that are assumed by your model.

I'm having the first issue you stated. Can you tell me how you fixed it?

from fastai2.

muellerzr avatar muellerzr commented on May 16, 2024

When you bring your learner back in make sure to re-define any functions your model wants to use along with it

from fastai2.

nikky4D avatar nikky4D commented on May 16, 2024

I did not define any functions, I believe. For instance, I defined these for my model:

dls = ImageDataLoaders.from_folder(path_output, train='train', valid_pct=0.3, bs=8)

learn = cnn_learner(dls, resnet34, metrics=error_rate)
learn.fine_tune(4)

learn.unfreeze()
learn.fit_one_cycle(n_epoch = 10, lr_max = 5e-3)
learn.save('model_34')

Then calling the code below gives the error:

tst_files = get_image_files(path_output/'test')
learn = load_learner(path_output/'models/model_34_unfrozen.pth', cpu=False)
tst_dl = learn.dls.test_dl(tst_files)

from fastai2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.