Skip to content

Instantly share code, notes, and snippets.

View FlorianMuellerklein's full-sized avatar

Florian FlorianMuellerklein

View GitHub Profile
@jakechen
jakechen / predict_mxnet_from_s3.py
Created August 27, 2017 20:22
Saving a trained MXNet model to S3, then recall and use the model for a prediction
import boto3
import mxnet as mx
from mxnet.io import NDArrayIter
def predict_from_s3(record, bucket_name, s3_symbol_key, s3_params_key):
"""Graphs MXNet network definitions from and S3 bucket and uses it for prediction on a single record
Keyword arguments:
record -- the record to predict from
bucket_name -- bucket where your MXNet network is stored