Created
October 7, 2020 10:30
-
-
Save siakon89/174db31aae03d6af077a9ce01de8e029 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
estimator = TensorFlow( | |
entry_point='model.py', # Script that has the model | |
train_instance_type='ml.p3.2xlarge', # The instance type for training | |
train_instance_count=1, # The number of instances to be spawned | |
model_dir='/opt/ml/model', # The location for the trained model | |
hyperparameters={ # Hyperparameters for the model | |
'epochs': 250, | |
'batch_size': 128, | |
'learning_rate': 0.001 | |
}, | |
role=sagemaker.get_execution_role(), # SageMaker's execution role | |
base_job_name='spot-training-test', # Name of the training job | |
framework_version='1.15', # Tensorflow version | |
py_version='py3', # Python version | |
script_mode=True, # Script mode enabled | |
train_use_spot_instances=True, # Use spot instance | |
train_max_run=600, # Max training time | |
train_max_wait=3600, # Max training time + spot waiting time | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment