I’m confused as to how a trained model is deployed. I trained a CNN using the LeNetMNISTReLu example class, and stored it on my pc. What’s next? I’d like to feed images into the model and view the output. Any link or insight would be appreciated.
@nacho few terms:
“Deploying” a model is relative to your application. Using a model in a main class isn’t really considered “deploying”. Deployment means putting it within an application, eg: embedding it in a mobile app or setting it up in a web application.
What you seem to want is performing inference. If you want to see the accuracy, it’s already accessible with net.evaluate on a test set that’s created for you.
For loading an image and performing inference, there are basically 4 steps:
Load the model using ModelSerializer.restoreMultiLayerNetwork(“path/to/model.zip”);
Use the NativeImageLoader to load target images.
3 Using that transform your image in to an ndarray.
Normalize the output using the normalizer from before (your data pipeline must always be consistent)