fastai / course-v3

The 3rd edition of course.fast.ai
https://course.fast.ai/
Apache License 2.0
4.91k stars 3.57k forks source link

In lesson2-download, category is not printed #531

Closed andresesfm closed 3 years ago

andresesfm commented 4 years ago

Instead what gets printed is: Category tensor(0) Expected: it should print the category such as: Teddy This has been addressed here: https://github.com/fastai/course-v3/pull/530

cbadjatya commented 4 years ago

The predict function returns 3 objects- prediction class, prediction id and output tensor. You can get the class name by printing the prediction class. pred_class,pred_idx,outputs = learn.predict(img); print(pred_class)