Hi everyone, I am new to deep learning. Expect your help on the following issues please.
I have followed the documentation for adding a test_folder
the code which guided me is
tfms =  path = Path('data').resolve() data = (ImageList.from_folder(path) .split_by_pct() .label_from_folder() .transform(tfms) .databunch() .normalize() ) learn = cnn_learner(data, models.resnet50, metrics=accuracy) learn.fit_one_cycle(5,1e-2) data_test = (ImageList.from_folder(path) .split_by_folder(train='train', valid='test') .label_from_folder() .transform(tfms) .databunch() .normalize() ) learn.validate(data_test.valid_dl)
All the steps were working fine except the line
and gives an error as follows
but when I write the code as
It worked fine and gave the result as follows
Can you please explain this issue and guide me towards a right path.
Further, please explain how to plot confusion matrix for the test accuracy.
Thanks a lot.