I have trouble understanding how to configure the LstmCnnCrfTagger, whose initialization is defined as follows:
class LstmCnnCrfTagger(sequence_tagger.SequenceTagger):
"""Defines a bidirectional LSTM-CNNs-CRF as described in https://arxiv.org/abs/1603.01354."""
def __init__(self):
super().__init__(
inputter=inputters.MixedInputter(
[
inputters.WordEmbedder(embedding_size=100),
inputters.CharConvEmbedder(
embedding_size=30,
num_outputs=30,
kernel_size=3,
stride=1,
dropout=0.5,
),
],
dropout=0.5,
),
encoder=encoders.RNNEncoder(
num_layers=1,
num_units=400,
bidirectional=True,
dropout=0.5,
residual_connections=False,
cell_class=tf.keras.layers.LSTMCell,
),
crf_decoding=True,
)
Specifically, I am wondering how to override the layers setting, as, in my experience with other frameworks, just one layer in encoding is insufficient to get good results for my downstream tasks. I could not find any examples in the Docs directory showing how, or where, to configure the number of layers. Thus, it is not clear to me if I need to define my own model, or if this variable is mutable at runtime.
Additionally, I would like to know if there is a way to confirm that the settings in the yaml file have an effect on the model, or not. Seemingly, as long as the yaml parses validly, the code executes, even if variable names are wrong, or in the wrong section, etc.