Plot_top_losses throws IndexError with the training set


(Rohit Gupta) #1
train_interp = ClassificationInterpretation.from_learner(learn, ds_type=DatasetType.Train)
train_interp.plot_top_losses(9)

plot_top_losses is still hardcoded with valid_ds

Replacing with
self.data.dl(self.ds_type).dataset[idx]
might work for both.


#2

Will fix.


(Rohit Gupta) #3

Ok.
Just one more question @sgugger. resize doesn’t work if tfms=None?

data = (src.transform(tfms=None, size=150, resize_method=ResizeMethod.SQUISH)
       .databunch(bs=32))

It gives error with learn.lr_find():

RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 150 and 113 in dimension 2

I want to try on raw_images with no other transformations except resizing.

Do I need to create a get_transforms() with proper values in order to avoid transformations or is there any other way to do just resizing?


#4

It was a bug fixed yesterday actually, so you won’t have the problem in master (or v1.0.43 when it’s released).


(Rohit Gupta) #5

Ok, thanks again. :slight_smile: