Skip to content

Instantly share code, notes, and snippets.

@aymericdelab
Last active October 17, 2019 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aymericdelab/7aa6609dc0510676d673214e2df12a33 to your computer and use it in GitHub Desktop.
Save aymericdelab/7aa6609dc0510676d673214e2df12a33 to your computer and use it in GitHub Desktop.
# deployment as an endpoint on a SageMaker instance
predictor = estimator.deploy(initial_instance_count=1,
instance_type='ml.p2.xlarge',
endpoint_name='founder-classifier-endpoint')
# image should be an array of dimension [-1,28,28,1] and type float64 as specified in our serving_input_fn
predictor.predict({'x': image})
# don't forget to delete your endpoint when you're finished using it
sagemaker.Session().delete_endpoint(predictor.endpoint)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment