Predicting image class using CGAN_mnist_R example

Hi all.

I’m kind of new in this field (neural network and mxnet usage)
I have been testing the example in this link.
The code works perfectly and I’m able to generate new images using the inference part at the end of the code.

My problem here is how I can predict the image class (let say I take one of the image produced by the generator network) using this example.

thanks.

Hi,

You would need to train a different neural network with labelled training data for each image class you’d like to predict to do that. Alternatively, you can use a pretrained model as done in this tutorial here: https://mxnet.incubator.apache.org/tutorials/r/classifyRealImageWithPretrainedModel.html

Some more examples for different model architectures are available here: https://github.com/apache/incubator-mxnet/tree/master/example/image-classification