I have trained a model using fastai and am trying to test it using the following command:
preds1, y1 = learn.get_preds(dl=data), where data is the dataloader object. It worked and I can get the predictions. However, the following command gives different predictions
preds2, y2 = learn.get_preds(dl=data.valid).
What is the difference between data and data.valid?
Thank you for your time,
There shouldn’t be, as
learn.dls.valid are the same thing. How are you creating
Thank you for your reply. I am loading the data from a pandas dataframe:
auds = DataBlock(blocks = (AudioBlock(crop_signal_to=args.seconds*1000), CategoryBlock),
get_x = ColReader(“FilePath”),
get_y = ColReader(“ClassID”),
splitter = IndexSplitter(df[df.DB == ‘Set1’].index),
item_tfms = item_tfms,
data = auds.dataloaders(df, bs=args.batch_size, shuffle=False)