Predicting hand sign number

Hello, predict th
I have completed the assignment (C2W3). I wonder how I cane class of only one example (or even other pictures that I have captured) after implementing the whole model?

Hey @Ali_Feghhi_Kouchehba,
Welcome to the community. All the Deep Learning frameworks such as Tensorflow, Keras, Caffe, etc comes with predict functions for their respective model classes. Using the predict function, you can predict the classes as many examples as you want, even one. You will see this in abundance in Course 4 of the specialization, Convolutional Neural Networks.

Even, you can see this in the second assignment of C1 W4. I have attached the screenshot for your reference. I hope this helps.


1 Like

thank you for your help.
the predict function isn’t available in this assignment’s folders. Can I predict the class by this forward propagation function:

A3 = forward_propagation((my example), parameters)

Thank you.

That basic method works, but you will need to add the softmax processing of the output layer. Note that this network was defined to produce the linear activation outputs at the output layer, so that it can use the from_logits = True mode of the loss function. Here’s a thread which talks about that.