Maximum value of max_n in show_batch()

What is the maximum number of images that can be showed using dataloaders.show_batch()?
Is it 9?

I don’t think there is a hard limit. The default is maximum is 9, but that can be overridden by supplying a new max_n value. At some point the figure will get too large so there is probably a practical limit, but I don’t know what it is.

1 Like

Naturally the upper limit should be the number of images in the batch: b.shape[0]

1 Like

Got it. Thanks for the clarification. :smiley:

Thanks!
Yes, that’s what I was expecting. I read that default batch size is 64 in fast ai so I was expecting the 64 images but I totally forgot that since I am not passing any value for max_n then it’s default value will be taken i.e. 9.

1 Like