Created
October 15, 2019 12:04
-
-
Save aymericdelab/a3815b563cb5e451858e56d85033d02a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from sagemaker import get_execution_role\n", | |
"from sagemaker.tensorflow import TensorFlow\n", | |
"\n", | |
"role=get_execution_role()\n", | |
"\n", | |
"estimator = TensorFlow(entry_point='aws_entry_point.py',\n", | |
" role=role,\n", | |
" training_steps=1000, \n", | |
" train_instance_count=1,\n", | |
" train_instance_type='ml.p2.xlarge',\n", | |
" hyperparameters={\n", | |
" 'learning_rate': 0.001,\n", | |
" 'batch_size' : 32\n", | |
" })" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"estimator.fit('s3://sagemaker-eu-west-1-107382316743/founder-classifier/data')" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "conda_tensorflow_p36", | |
"language": "python", | |
"name": "conda_tensorflow_p36" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment