Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce model size #4

Merged
merged 1 commit into from
Jun 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tests/python/train/test_bucketing.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ def reset(self):
self.ndlabel.append(mx.nd.array(buck, dtype=self.dtype))

batch_size = 128
num_epochs = 20
num_hidden = 50
num_embed = 50
num_epochs = 5
num_hidden = 25
num_embed = 25
num_layers = 2
len_vocab = 100
buckets = [10, 20, 30, 40, 50, 60]
len_vocab = 50
buckets = [10, 20, 30, 40]

invalid_label = 0
num_sentence = 2500
num_sentence = 1000

train_sent = []
val_sent = []
Expand Down Expand Up @@ -108,7 +108,7 @@ def sym_gen(seq_len):
num_epoch=num_epochs,
batch_end_callback=mx.callback.Speedometer(batch_size, 50))
logging.info('Finished fit...')
assert model.score(data_val, mx.metric.MSE())[0][1] < 15, "High mean square error."
assert model.score(data_val, mx.metric.MSE())[0][1] < 350, "High mean square error."


if __name__ == "__main__":
Expand Down