Saving the network to disk

We can also save the network to disk under a new name. We will simulate a call to mx.save_checkpoint, which is run by the neural network during the training process:

mx.save_checkpoint(nnet, "weights/inception-v3/InceptionV3-FE", mx.OptimizationState(1, 0, 0, 0))

Your new network will be located in weights/inception-v3 and consists of two files:

  • InceptionV3-FE-symbol.json
  • InceptionV3-FE-0000.params

You can reuse it anytime by instantiating it from a 0 checkpoint.

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.