Created
July 22, 2020 05:47
-
-
Save himkt/097ba6cffefcb5e5b7c5631dc082b181 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
{ | |
"dataset_reader":{ | |
"type": "sst_tokens", | |
"use_subtrees": true, | |
"granularity": "5-class" | |
}, | |
"validation_dataset_reader":{ | |
"type": "sst_tokens", | |
"use_subtrees": false, | |
"granularity": "5-class" | |
}, | |
"train_data_path": "https://allennlp.s3.amazonaws.com/datasets/sst/train.txt", | |
"validation_data_path": "https://allennlp.s3.amazonaws.com/datasets/sst/dev.txt", | |
"test_data_path": "https://allennlp.s3.amazonaws.com/datasets/sst/test.txt", | |
"model": { | |
"type": "bcn", | |
"text_field_embedder": { | |
"token_embedders": { | |
"tokens": { | |
"pretrained_file": "https://allennlp.s3.amazonaws.com/datasets/glove/glove.840B.300d.txt.gz", | |
"type": "embedding", | |
"embedding_dim": 300, | |
"trainable": false | |
} | |
} | |
}, | |
"embedding_dropout": std.extVar("embedding_dropout"), | |
"pre_encode_feedforward": { | |
"input_dim": 300, | |
"num_layers": 1, | |
"hidden_dims": [300], | |
"activations": ["relu"], | |
"dropout": [0.25] | |
}, | |
"encoder": { | |
"type": "lstm", | |
"input_size": 300, | |
"hidden_size": 300, | |
"num_layers": 1, | |
"bidirectional": true | |
}, | |
"integrator": { | |
"type": "lstm", | |
"input_size": 1800, | |
"hidden_size": 300, | |
"num_layers": 1, | |
"bidirectional": true | |
}, | |
"integrator_dropout": 0.1, | |
"output_layer": { | |
"input_dim": 2400, | |
"num_layers": 3, | |
"output_dims": [1200, 600, 5], | |
"pool_sizes": 4, | |
"dropout": [0.2, 0.3, 0.0] | |
} | |
}, | |
"data_loader": { | |
"batch_sampler": { | |
"type": "bucket", | |
"batch_size" : 100 | |
} | |
}, | |
"trainer": { | |
"num_epochs": 40, | |
"patience": 5, | |
"grad_norm": 5.0, | |
"validation_metric": "+accuracy", | |
"cuda_device": -1, | |
"optimizer": { | |
"type": "adam", | |
"lr": 0.001 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment