{
  "dataset_reader": {
    "type": "snli",
    "token_indexers": {
      "tokens": {
        "type": "single_id",
        "lowercase_tokens": true
      }
    }
  },
  "train_data_path": "allennlp/tests/fixtures/data/snli.jsonl",
  "validation_data_path": "allennlp/tests/fixtures/data/snli.jsonl",
  "model": {
    "type": "esim",
    "dropout": 0.5,
    "text_field_embedder": {
      "token_embedders": {
        "tokens": {
            "type": "embedding",
            "pretrained_file": "allennlp/tests/fixtures/embeddings/glove.6B.300d.sample.txt.gz",
            "embedding_dim": 300,
            "trainable": false,
            "projection_dim": 10,
        }
      }
    },
    "encoder": {
      "type": "lstm",
      "input_size": 10,
      "hidden_size": 25,
      "num_layers": 1,
      "bidirectional": true
    },
    "matrix_attention": {"type": "dot_product"},
    "projection_feedforward": {
      "input_dim": 200,
      "hidden_dims": 25,
      "num_layers": 1,
      "activations": "relu"
    },
    "inference_encoder": {
      "type": "lstm",
      "input_size": 25,
      "hidden_size": 25,
      "num_layers": 1,
      "bidirectional": true
    },
    "output_feedforward": {
      "input_dim": 200,
      "num_layers": 1,
      "hidden_dims": 5,
      "activations": "relu",
      "dropout": 0.0
    },
    "output_logit": {
      "input_dim": 5,
      "num_layers": 1,
      "hidden_dims": 3,
      "activations": "linear"
    },
     "initializer": {
       "regexes": [
        [".*linear_layers.*weight", {"type": "xavier_uniform"}],
        [".*linear_layers.*bias", {"type": "zero"}],
        [".*weight_ih.*", {"type": "xavier_uniform"}],
        [".*weight_hh.*", {"type": "orthogonal"}],
        [".*bias_ih.*", {"type": "zero"}],
        [".*bias_hh.*", {"type": "lstm_hidden_bias"}]
       ]
     }
   },
   "data_loader": {
    "batch_sampler": {
        "type": "bucket",
        "batch_size": 32,
        "padding_noise": 0.0
    }
},
  "trainer": {
    "optimizer": {
        "type": "adam",
        "lr": 0.0004
    },
    "validation_metric": "+accuracy",
    "checkpointer": {
      "num_serialized_models_to_keep": 2
    },
    "num_epochs": 5,
    "grad_norm": 10.0,
    "patience": 2,
    "cuda_device": -1,
    "learning_rate_scheduler": {
      "type": "reduce_on_plateau",
      "factor": 0.5,
      "mode": "max",
      "patience": 0
    }
  }
}
