Skip to content

Instantly share code, notes, and snippets.

@siakon89
Created March 29, 2020 18:31
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 siakon89/748bc379ed1c8ce4e53ce29b56d1aceb to your computer and use it in GitHub Desktop.
Save siakon89/748bc379ed1c8ce4e53ce29b56d1aceb to your computer and use it in GitHub Desktop.
model_dir = '/opt/ml/model'
train_instance_type = 'ml.c5.2xlarge'
hyperparameters = {'epochs': 10, 'batch_size': 256, 'learning_rate': 0.001}
estimator = TensorFlow(
entry_point='model.py',
train_instance_type=train_instance_type,
train_instance_count=1,
model_dir=model_dir,
hyperparameters=hyperparameters,
role=sagemaker.get_execution_role(),
base_job_name='tf-fashion-mnist',
framework_version='1.15',
py_version='py3',
script_mode=True
)
estimator.fit(inputs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment