MCPcopy Create free account
hub / github.com/clab/dynet / PrefixCodeDecoder

Method PrefixCodeDecoder

examples/word-embedding/train_tok-embed.cc:132–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130 PrefixCode* pfc;
131 Parameter p_start;
132 explicit PrefixCodeDecoder(ParameterCollection& model, PrefixCode* pc) :
133 decoder(LAYERS, CHAR_DIM, EMBED_DIM, model), pfc(pc) {
134 p_start = model.add_parameters({EMBED_DIM});
135 }
136 Expression loss(ComputationGraph& cg, const Expression& v, const string& code) {
137 decoder.new_graph(cg);
138 Expression h = tanh(v);

Callers

nothing calls this directly

Calls 1

add_parametersMethod · 0.45

Tested by

no test coverage detected