Hey guys, I’m just starting here and with DL. I’m building image multi-label-classifier, but while fine_tune(10), I receive following error after first epoch: "
AssertionError: Exception occured in `Recorder` when calling event `after_batch`:
==: "
My code:
training = tuple(zip(train_X, train_y)) # where train_X is a 3rd rank tensor in a shape of (300,256,256), and train_y is tensor shaped (300,)
epl_2122_season = DataBlock(
blocks=(ImageBlock(), MultiCategoryBlock()),
get_x=ItemGetter(0), get_y=ItemGetter(1))
dls = epl_2122_season.dataloaders(
source=training, shuffle=False)
learn = vision_learner(dls, resnet18, metrics=accuracy)
learn.fine_tune(10)
Below I also paste a summary(training) output.
Found 300 items
2 datasets of sizes 240,60
Setting up Pipeline: ItemGetter -> PILBase.create
Setting up Pipeline: ItemGetter -> MultiCategorize -- {'vocab': None, 'sort': True, 'add_na': False} -> OneHotEncode -- {'c': None}
Setting up after_item: Pipeline: ToTensor
Setting up before_batch: Pipeline:
Setting up after_batch: Pipeline: IntToFloatTensor -- {'div': 255.0, 'div_mask': 1}
Building one batch
Applying item_tfms to the first sample:
Pipeline: ToTensor
starting from
(PILImage mode=F size=258x258, TensorMultiCategory([1., 0., 0.]))
applying ToTensor gives
(TensorImage of size 1x258x258, TensorMultiCategory([1., 0., 0.]))
Adding the next 3 samples
No before_batch transform to apply
Collating items in a batch
Applying batch_tfms to the batch built
Pipeline: IntToFloatTensor -- {'div': 255.0, 'div_mask': 1}
starting from
(TensorImage of size 4x1x258x258, TensorMultiCategory of size 4x3)
applying IntToFloatTensor -- {'div': 255.0, 'div_mask': 1} gives
(TensorImage of size 4x1x258x258, TensorMultiCategory of size 4x3)
Any ideas why I’m getting this error?