Skip to content

Instantly share code, notes, and snippets.

@RoaldSchuring
Created July 8, 2019 02:40
Show Gist options
  • Save RoaldSchuring/b05aeb4bd5837f8c4fd48524a16641f1 to your computer and use it in GitHub Desktop.
Save RoaldSchuring/b05aeb4bd5837f8c4fd48524a16641f1 to your computer and use it in GitHub Desktop.
configure_estimator
sess = sagemaker.Session()
# define the specifications of the sagemaker training instance
bt_model = sagemaker.estimator.Estimator(container,
role,
train_instance_count=2,
train_instance_type='ml.c4.2xlarge',
train_volume_size = 5,
train_max_run = 360000,
input_mode= 'File',
output_path=s3_output_location,
sagemaker_session=sess)
# set the hyperparameters of the BlazingText model
bt_model.set_hyperparameters(mode="batch_skipgram",
epochs=15,
min_count=5,
sampling_threshold=0.0001,
learning_rate=0.05,
window_size=5,
vector_dim=300,
negative_samples=5,
batch_size=11,
evaluation=True,
subwords=False)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment