LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
train_params_graph_dp.h
Go to the documentation of this file.
1// Copyright 2022 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6#ifndef DEEPLIMA_LIBS_TASKS_GRAPH_DP_PARAMS_H
7#define DEEPLIMA_LIBS_TASKS_GRAPH_DP_PARAMS_H
8
9#include <string>
10
12
13namespace deeplima
14{
15namespace graph_dp
16{
17namespace train
18{
19
21{
22 std::string m_embeddings_fn;
23
24 std::string m_tasks_string;
25
26 std::vector<size_t> m_rnn_hidden_dims;
29
31
33
34 // The defaults below reproduce the models trained before they were options
35 size_t m_tag_embd_dim; // embedding dim of each tag input (upos, each feature)
36 size_t m_arc_dim; // hidden dim of the arc decoder
37 size_t m_rel_dim; // hidden dim of the label decoder (its cost: labels x dim^2 per word)
38 float m_rnn_dropout; // between BiLSTM layers
39 float m_decoder_dropout; // on the encoder output, before the decoders
40 float m_word_dropout; // probability to zero a word's form embedding
41 float m_lr_decay; // learning rate factor after an epoch without improvement
42 float m_clip; // gradient norm clipping (0: none)
43 std::string m_select_on; // dev metric that selects the model: arc (UAS) or las
44 size_t m_min_sentence_len; // shorter sentences are skipped
45 uint64_t m_seed; // of torch and of the batch sampling (0: not seeded)
46
68};
69
70} // namespace train
71} // namespace graph_dp
72} // namespace deeplima
73
74#endif
Edit rules for lemmatizing words absent from the lemma dictionary.