Comments (5)
Actually it was just me being stupid—just re-define all the functions that are assumed by your model.
from fastai2.
Yes. We actually go over that once we hit lesson 5 in the study group :)
from fastai2.
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.
When you bring your learner back in make sure to re-define any functions your model wants to use along with it
from fastai2.
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)
- AttributeError: type object 'Tensor' has no attribute 'as_subclass' HOT 2
- RuntimeError: imag is not implemented for tensors with non-complex dtypes. HOT 4
- Multi GPU Training for a unet_learner HOT 1
- nbdev_test_nbs do not work without a GPU HOT 2
- Can't nbdev_build_lib, File not found error HOT 7
- failed nbdev_build_lib, FileNotFoundError topnav.yml HOT 1
- Re-added `lang` to default tokenizer? HOT 1
- One must numericalize labels in FastAI2 metrics, unlike SKLearn metrics HOT 2
- README Needs to be refreshed HOT 1
- Split comment on PR in main.yaml HOT 2
- Not able to clone fastai-docs in my clone repo. HOT 5
- Learning rate finder breaks with pytorch DataLoader
- latest fastai2 v0.0.24 learner summary() RuntimeError: Input type (torch.cuda.FloatTensor) != weight type (torch.FloatTensor) HOT 1
- Have the ability to add our own type_tfms on test_dl HOT 3
- Cannot override tokenizer with TextBlock (tok_func does not exist as an argument anymore) HOT 1
- We might be able to "not" also fork `fastai-docs` HOT 1
- Does gradient clip in `to_fp16` really take effect ? HOT 1
- Don't turn layernorm into fp16 HOT 2
- Validation set contains unseen category as target HOT 1
- Major Bug regarding TensorPoints HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastai2.