NameError: name 'get_transforms' is not defined

Question:

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?

Asked By: sevil.z

||

Answers:

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

Answered By: Alexander Riedel

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

Answered By: TechMarvel

Enter this code at the very beginning and download it :

!pip install "torch==1.4" "torchvision==0.5.0"
Answered By: asdqpw
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.