ValueError: Expected input batch_size (64) to match target batch_size (128)

I am training my custom capsule network for time series data using granular angular difference field images having 9 column features as channels for custom image dataloader.
My dataloader look like this:

ImageDataBunch;

Train: LabelList (447 items)
x: NpyNpyList
Image (9, 5, 5),Image (9, 5, 5),Image (9, 5, 5),Image (9, 5, 5),Image (9, 5, 5)
y: NpyItemList
Image (2,),Image (2,),Image (2,),Image (2,),Image (2,)
Path: images;

Valid: LabelList (111 items)
x: NpyNpyList
Image (9, 5, 5),Image (9, 5, 5),Image (9, 5, 5),Image (9, 5, 5),Image (9, 5, 5)
y: NpyItemList
Image (2,),Image (2,),Image (2,),Image (2,),Image (2,)
Path: images;

I am giving the first 5 days as input and the next 2 days as output

My model looks like this:

I am getting this error:

please help @jeremy @sgugger

I’m having the same problem with a U-Net: lr_find() says ValueError: Expected input batch_size (32) to match target batch_size (163200).

There is also a github issue related to this.

EDIT: oh gosh! Maybe the fact that i left learn = cnn_learner(...) instead of writing learn = unet_learner(...) has something to do with this error… :man_facepalming: