Sergiu Ionescu
Sergiu Ionescu

Reputation: 341

Can you load a SageMaker trained model into Keras?

I have followed the AWS tutorial(https://github.com/awslabs/amazon-sagemaker-examples/blob/master/introduction_to_amazon_algorithms/object_detection_pascalvoc_coco/object_detection_image_json_format.ipynb) and trained my first model using SageMaker.

The end result is an archive containing the following files: - hyperparams.json - model_algo_1-0000.params - model_algo_1-symbol.json

I am not familiar with this format, and was not able to load it into Keras via keras.models.model_from_json()

I am assuming this is a different format or an AWS proprietary one.

Can you please help me identify the format? Is it possible to load this into a Keras model and do inference without an EC2 instance(locally)?

Thanks!

Upvotes: 1

Views: 242

Answers (1)

Julien Simon
Julien Simon

Reputation: 2729

Built-in algorithms are implemented with Apache MXNet, so that's how you'd load the model locally. load_checkpoint() is the appropriate API: https://mxnet.apache.org/api/python/docs/api/mxnet/model/index.html#mxnet.model.load_checkpoint

Upvotes: 2

Related Questions