Saving the network to disc

The last step is to save the network using the mx.save_checkpoint function:

mx.save_checkpoint(nnet, "weights/mobilenet-v2/MobiletNet-FE", mx.OptimizationState(1, 0, 0, 0))

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

  • MobileNet-FE-symbol.json
  • MobiletNet-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.