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
11
#include "
tasks/common/train_params.h
"
12
13
namespace
deeplima
14
{
15
namespace
graph_dp
16
{
17
namespace
train
18
{
19
20
struct
train_params_graph_dp_t
:
public
deeplima::train::train_params_t
21
{
22
std::string
m_embeddings_fn
;
23
24
std::string
m_tasks_string
;
25
26
std::vector<size_t>
m_rnn_hidden_dims
;
27
size_t
m_trainable_embeddings_dim
;
28
size_t
m_trainable_embeddings_cutoff_freq
;
// ipm
29
30
size_t
m_sequence_length
;
31
32
bool
m_input_includes_root
;
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
47
train_params_graph_dp_t
()
48
:
m_tasks_string
(
"arc"
),
49
m_rnn_hidden_dims
({64}),
50
m_trainable_embeddings_dim
(0),
51
m_trainable_embeddings_cutoff_freq
(100),
52
m_sequence_length
(256),
53
m_input_includes_root
(
true
),
54
m_tag_embd_dim
(8),
55
m_arc_dim
(128),
56
m_rel_dim
(128),
57
m_rnn_dropout
(0),
58
m_decoder_dropout
(0),
59
m_word_dropout
(0),
60
m_lr_decay
(0.9),
61
m_clip
(0),
62
m_select_on
(
"arc"
),
63
m_min_sentence_len
(4),
64
m_seed
(0) {
65
m_batch_size
= 8;
66
m_max_epochs
= 1000;
67
}
68
};
69
70
}
// namespace train
71
}
// namespace graph_dp
72
}
// namespace deeplima
73
74
#endif
deeplima::graph_dp::train
Definition
birnn_and_deep_biaffine_attention.cpp:25
deeplima::graph_dp
Definition
graph_dp_eigen_inference_impl.h:20
deeplima
Edit rules for lemmatizing words absent from the lemma dictionary.
Definition
dependency_parser.h:28
deeplima::graph_dp::train::train_params_graph_dp_t::m_seed
uint64_t m_seed
Definition
train_params_graph_dp.h:45
deeplima::graph_dp::train::train_params_graph_dp_t::m_tag_embd_dim
size_t m_tag_embd_dim
Definition
train_params_graph_dp.h:35
deeplima::graph_dp::train::train_params_graph_dp_t::m_arc_dim
size_t m_arc_dim
Definition
train_params_graph_dp.h:36
deeplima::graph_dp::train::train_params_graph_dp_t::m_sequence_length
size_t m_sequence_length
Definition
train_params_graph_dp.h:30
deeplima::graph_dp::train::train_params_graph_dp_t::m_min_sentence_len
size_t m_min_sentence_len
Definition
train_params_graph_dp.h:44
deeplima::graph_dp::train::train_params_graph_dp_t::m_tasks_string
std::string m_tasks_string
Definition
train_params_graph_dp.h:24
deeplima::graph_dp::train::train_params_graph_dp_t::m_decoder_dropout
float m_decoder_dropout
Definition
train_params_graph_dp.h:39
deeplima::graph_dp::train::train_params_graph_dp_t::train_params_graph_dp_t
train_params_graph_dp_t()
Definition
train_params_graph_dp.h:47
deeplima::graph_dp::train::train_params_graph_dp_t::m_clip
float m_clip
Definition
train_params_graph_dp.h:42
deeplima::graph_dp::train::train_params_graph_dp_t::m_select_on
std::string m_select_on
Definition
train_params_graph_dp.h:43
deeplima::graph_dp::train::train_params_graph_dp_t::m_lr_decay
float m_lr_decay
Definition
train_params_graph_dp.h:41
deeplima::graph_dp::train::train_params_graph_dp_t::m_rnn_dropout
float m_rnn_dropout
Definition
train_params_graph_dp.h:38
deeplima::graph_dp::train::train_params_graph_dp_t::m_trainable_embeddings_cutoff_freq
size_t m_trainable_embeddings_cutoff_freq
Definition
train_params_graph_dp.h:28
deeplima::graph_dp::train::train_params_graph_dp_t::m_input_includes_root
bool m_input_includes_root
Definition
train_params_graph_dp.h:32
deeplima::graph_dp::train::train_params_graph_dp_t::m_trainable_embeddings_dim
size_t m_trainable_embeddings_dim
Definition
train_params_graph_dp.h:27
deeplima::graph_dp::train::train_params_graph_dp_t::m_rnn_hidden_dims
std::vector< size_t > m_rnn_hidden_dims
Definition
train_params_graph_dp.h:26
deeplima::graph_dp::train::train_params_graph_dp_t::m_rel_dim
size_t m_rel_dim
Definition
train_params_graph_dp.h:37
deeplima::graph_dp::train::train_params_graph_dp_t::m_embeddings_fn
std::string m_embeddings_fn
Definition
train_params_graph_dp.h:22
deeplima::graph_dp::train::train_params_graph_dp_t::m_word_dropout
float m_word_dropout
Definition
train_params_graph_dp.h:40
deeplima::train::train_params_t
Definition
train_params.h:20
deeplima::train::train_params_t::m_max_epochs
size_t m_max_epochs
Definition
train_params.h:37
deeplima::train::train_params_t::m_batch_size
size_t m_batch_size
Definition
train_params.h:39
train_params.h
deeplima
libs
tasks
graph_dp
model
train_params_graph_dp.h
Generated by
1.15.0