Sevil
Sevil

Reputation: 53

NameError: name 'get_transforms' is not defined

This code was running without any problems before I updated my python and fastai:

from fastai import *
from fastai.vision import *
import torch
...
tfms = get_transforms(do_flip=True,flip_vert=True,max_rotate=360,max_warp=0,max_zoom=1.1,max_lighting=0.1,p_lighting=0.5)

After updating the fastai to 2.1.2 and python to 3.8.5, I'm getting this error: NameError: name 'get_transforms' is not defined.

How can I fix it?

Upvotes: 5

Views: 10790

Answers (3)

asdqpw
asdqpw

Reputation: 1

Enter this code at the very beginning and download it :

!pip install "torch==1.4" "torchvision==0.5.0"

Upvotes: 0

TechMarvel
TechMarvel

Reputation: 1

I got the same question, fastai 1.0.61 could probably solve the problem.

Upvotes: 0

Alexander Riedel
Alexander Riedel

Reputation: 1359

For Data Augmentation methods in FastAI 2 you have to use other methods names, for example: aug_transforms

Upvotes: 4

Related Questions