Permalink
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (73 sloc) 1.82 KB
description: >
ESIM model https://arxiv.org/abs/1609.06038
parent_config: './conf/nli/modular_nli.yaml'
name: 'esim_reader'
model:
encoder_layer:
# BiLSTM
- input: 'hypothesis'
module: 'lstm'
with_projection: True # not in original model but helps
activation: 'tanh'
name: 'encoder'
dropout: True
# BiLSTM
- input: 'premise'
module: 'lstm'
with_projection: True # not in original model but helps
activation: 'tanh'
name: 'encoder'
dropout: True
# Attention
- input: 'premise'
dependent: 'hypothesis'
output: 'hypothesis_attn'
module: 'attention_matching'
attn_type: 'dot'
concat: False
- input: 'hypothesis'
dependent: 'premise'
output: 'premise_attn'
module: 'attention_matching'
attn_type: 'dot'
concat: False
- input: ['premise', 'hypothesis_attn']
output: 'premise_mul'
module: 'mul'
- input: ['premise', 'hypothesis_attn']
output: 'premise_sub'
module: 'sub'
- input: ['premise', 'hypothesis_attn', 'premise_mul', 'premise_sub']
output: 'premise'
module: 'concat'
- input: 'premise'
module: 'dense'
name: 'projection'
activation: 'relu'
dropout: True
- input: ['hypothesis', 'premise_attn']
output: 'hypothesis_mul'
module: 'mul'
- input: ['hypothesis', 'premise_attn']
output: 'hypothesis_sub'
module: 'sub'
- input: ['hypothesis', 'premise_attn', 'hypothesis_mul', 'hypothesis_sub']
output: 'hypothesis'
module: 'concat'
- input: 'hypothesis'
module: 'dense'
name: 'projection'
activation: 'relu'
dropout: True
# inference composition
# BiLSTM
- input: 'hypothesis'
module: 'lstm'
name: 'composition'
# BiLSTM
- input: 'premise'
module: 'lstm'
name: 'composition'
prediction_layer:
module: 'max_avg_mlp'
dropout: True