Open fortunto2 opened 3 years ago
worked with dataframe... but why with get_image_files problems?
batch_tfms = [*aug_transforms(size=224, max_warp=0), Normalize.from_stats(*imagenet_stats)]
bs=256
dls = (ImageDataLoaders.from_df(
df=train,
path=path,
item_tfms=Resize(224),
batch_tfms=batch_tfms, bs=bs,
))
dls.valid = dls.train
dl_test = dls.test_dl(train,
with_labels=True,
path=path,
bs=256,
num_workers=4,
shuffle=False,
drop_last=False
)
preds = learn.get_preds(dl=dl_test, with_decoded=True, with_loss=True, reorder=False)
I trained the model resnet50 on my dataset, and now I want to get predictions from the loaded model.
I'm not sure, but there seems to be some strange error when using the result prediction (get_preds).
fastai: 2.1.8 fastcore: 1.3.10 torch: 1.7.0 torchvision: 0.8.1 cuda=10.1 (GPU used)
Linux(Debian)
when use get_preds, get error
TTA work fine, but i want use get_preds (for features extract)
Additional context
Model file: https://dropmefiles.com/VC0Ku
Further I ran into when pulling out signs with this problem. While I decided to stay on the grid resnet50
https://forums.fast.ai/t/efficientnet-timm-extract-features-in-fastai-v2/82889
resnet50 learner