in mxnet_managed_spot_training_checkpointing/source_dir/mnist.py [0:0]
def save(model_dir, model):
model.symbol.save(os.path.join(model_dir, 'model-symbol.json'))
model.save_params(os.path.join(model_dir, 'model-0000.params'))
signature = [{'name': data_desc.name, 'shape': [dim for dim in data_desc.shape]}
for data_desc in model.data_shapes]
with open(os.path.join(model_dir, 'model-shapes.json'), 'w') as f:
json.dump(signature, f)