43 mlp_head(register_module(
"mlp_head", torch::nn::Linear(input_dim, hidden_dim))),
44 mlp_dep(register_module(
"mlp_dep", torch::nn::Linear(input_dim, hidden_dim))),
48 U(register_parameter(
"U", torch::randn({
num_labels, hidden_dim + 1, hidden_dim + 1})
49 * (1.0 / std::sqrt(
double(hidden_dim + 1))))),
50 root(register_parameter(
"root", torch::randn({1, 1, hidden_dim})))