Skip to content

Instantly share code, notes, and snippets.

@aymericdelab
Created October 17, 2019 12:07
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/79e747cb7ead2e583abf93fb91244450 to your computer and use it in GitHub Desktop.
Save aymericdelab/79e747cb7ead2e583abf93fb91244450 to your computer and use it in GitHub Desktop.
launch training on sagemaker
from sagemaker import get_execution_role
from sagemaker.tensorflow import TensorFlow
role=get_execution_role()
estimator = TensorFlow(entry_point='aws_entry_point.py',
role=role,
training_steps=1000,
train_instance_count=1,
train_instance_type='ml.p2.xlarge',
hyperparameters={
'learning_rate': 0.001,
'batch_size' : 32
})
estimator.fit('s3://sagemaker-eu-west-1-107382316743/founder-classifier/data')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment