我应该添加什么来删除这个 imagedatabunch 错误 NameError: name 'ImageDataBunch' is not defined

时间:2021-06-03 11:14:51

标签: python-3.x fast-ai image-classification

我正在使用 fastai,当我像这样使用 ImageDataBunch

data = ImageDataBunch.from_folder(train_folder,valid_pct=0.2,ds_tfms=get_transforms(),size=224)

我收到一个错误:NameError: name 'ImageDataBunch' is not defined

我已经使用了所有这些依赖项

from fastai import *
from fastai.vision import *
from fastai.metrics import error_rate
from PIL import Image
import numpy as np
import pandas as pd
import os

0 个答案:

没有答案