Last active
July 7, 2019 23:45
-
-
Save RoaldSchuring/14b256727a8c5ece833084f4a97b6949 to your computer and use it in GitHub Desktop.
set_sagemaker_and_model_params_blazingtext
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
sess = sagemaker.Session() | |
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) | |
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, # = (2*window_size + 1) (Preferred. Used only if mode is batch_skipgram) | |
evaluation=True,# Perform similarity evaluation on WS-353 dataset at the end of training | |
subwords=False) # Subword embedding learning is not supported by batch_skipgram |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment