Loading the network

Loading a pre-trained model is similar to loading your model from a checkpoint. We will use the mx.load_checkpoint function to instantiate the model from a checkpoint and also load the synset file containing the class names. This is done with the following code:

using Images, MXNetconst MODEL_NAME = "weights/inception-v3/Inception-7"const MODEL_CLASS_NAMES = "weights/inception-v3/synset.txt"nnet = mx.load_checkpoint(MODEL_NAME, 1, mx.FeedForward);synset = readlines(MODEL_CLASS_NAMES);

The model is loaded and ready to be used for inference!

Get Hands-On Computer Vision with Julia now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.