Hi everyone
I have problem with adding 'with_labels= ’ argument in
test_set (dsets:__main__.Datasets|__main__.TfmdLists, test_items,
rm_tfms=None, with_labels:bool=False)
my goal is to use learn.validate() on testset and get accuracy from testset. so I should make test_dl.
here is my code:
dls=ImageDataLoaders.from_df(df_aptos,path,folder='preprocessed',
label_col=1,batch_tfms=Normalize(),bs=64)
fns_small = fnames[:10]; fns_small[0] #just for test my code
a=dls.test_dl(fns_small,with_labels=True) # or a = test_set(dls.valid_ds, fns_small)
df_aptos:
error: Expected an input of type in
- <class ‘pandas.core.series.Series’>
- <class ‘numpy.int64’>
- <class ‘fastai.torch_core.TensorCategory’>
but got <class ‘pathlib.PosixPath’>