Hi, this is my first post on the forum, and hopefully not the last one so I hope I’m doing everything right
I like the idea of Top-Down teaching. You show what I can do with the tool from the beginning and then, when I’m interested and when I’m hooked - you show all the details.
Great idea, but after reviewing from the top side I still don’t know how to predict is this a cat on picture or a dog. (I’m not a newbie in Python at all)
What I expected. I teach NN and the I can give any picture to it and get prediction from the NN is this a cat or dog.
Maybe something like
learn.predict_one(path_to_pic) == 0.999
I don’t know
But for know I just saw how good model that we taught by just level of prediction like 0.999 which is good, I would see more practical part of that.
The first thing you would have to do is to load your picture into an array, by using the function open_image.
Then you can use the method learn.predict_array to have the predictions of your model on it. Beware though, this function expects an array of four dimensions: mini_batch by channels by height by width, so you will have to add one dimension at the beginning to make the shape of your picture array1x3xhxw.
What sgugger said was pretty much what you should do to achieve what you are looking for. But, if you are still not clear, you can refer to this thread, “How do we use our model against a specific image?”. This was discussed at length there together with Jeremy’s replies.
It’s a bit tricky to get this all to works. Fret not, if you are looking for the latest codes to get this working, here’s the direct link to my reply in the same thread. I hope it helps in some ways.