Save/Load MXNet model parameters using NumPy
问题 How can I save the parameters for an MXNet model into a NumPy file (.npy)? After doing so, how can I load these parameters from the .npy file back into my model? Here is a minimal example to save the parameters for MXNet model using MXNet API. import mxnet as mx from mxnet import gluon from mxnet.gluon.model_zoo import vision import numpy as np num_gpus = 0 ctx = [mx.gpu(i) for i in range(num_gpus)] if num_gpus > 0 else [mx.cpu()] resnet = vision.resnet50_v2(pretrained=True, ctx=ctx)