forked from larryniven/nn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lstm-seg.h
59 lines (42 loc) · 1.71 KB
/
lstm-seg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef LSTM_SEG_H
#define LSTM_SEG_H
#include <memory>
#include "autodiff/autodiff.h"
#include "nn/tensor-tree.h"
#include "nn/lstm.h"
namespace lstm_seg {
std::shared_ptr<tensor_tree::vertex> make_tensor_tree(int layer,
std::unordered_map<std::string, std::string> const& args);
std::shared_ptr<autodiff::op_t> make_pred_nn(
autodiff::computation_graph& graph,
lstm::stacked_bi_lstm_nn_t& nn,
std::shared_ptr<tensor_tree::vertex> var_tree,
std::shared_ptr<tensor_tree::vertex> param,
std::unordered_map<std::string, std::string> const& args);
std::shared_ptr<tensor_tree::vertex> make_tensor_tree(int layer);
std::shared_ptr<autodiff::op_t> make_pred_nn(
autodiff::computation_graph& graph,
lstm::stacked_bi_lstm_nn_t& nn,
std::shared_ptr<tensor_tree::vertex> var_tree);
std::shared_ptr<autodiff::op_t> make_pred_nn_uniform(
autodiff::computation_graph& graph,
lstm::stacked_bi_lstm_nn_t& nn,
std::shared_ptr<tensor_tree::vertex> var_tree,
int h_dim);
namespace endpoints {
std::shared_ptr<tensor_tree::vertex> make_tensor_tree(int layer);
std::shared_ptr<autodiff::op_t> make_pred_nn(
autodiff::computation_graph& graph,
lstm::stacked_bi_lstm_nn_t& nn,
std::shared_ptr<tensor_tree::vertex> var_tree);
}
namespace logp {
std::shared_ptr<tensor_tree::vertex> make_tensor_tree(int layer);
std::shared_ptr<autodiff::op_t> make_pred_nn(
autodiff::computation_graph& graph,
lstm::stacked_bi_lstm_nn_t& nn,
std::shared_ptr<tensor_tree::vertex> var_tree,
int h_dim);
}
}
#endif