5

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?

sevil.z
  • 53
  • 1
  • 4

3 Answers3

4

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

Alexander Riedel
  • 1,329
  • 1
  • 7
  • 14
0

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

0

Enter this code at the very beginning and download it :

!pip install "torch==1.4" "torchvision==0.5.0"
cafce25
  • 15,907
  • 4
  • 25
  • 31
asdqpw
  • 1