Lesson 1. How to use saved model?

Step 1, open the image.
img = open_image(path/‘shouko/vlcsnap-2020-02-05-17h08m13s825.png’)
Step 2, load it into the model(if you have dataloader issue, it means you have not load the dataloader before).
pred_class,pred_idx,outputs = learn.predict(img)
Step 3
receives an answer on what the object is.

Step 0:
it is for exporting the model, including the classes of the model. The classes in your case are the breed of the cat.



My Code(Github)


Recolored powered by powerful Fastai
02f0bbfd00b0bca4153f5d24308e3b24

I hope I can help you.

1 Like