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

Method Decode

examples/read-write/train_read-write.cc:62–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 }
61
62 float Decode(vector<dynet::real>& input) {
63 ComputationGraph cg;
64 NewGraph(cg);
65
66 Expression x = dynet::input(cg, {(unsigned int)input.size()}, &input);
67 Expression h = tanh(W*x + b);
68 Expression y_pred = V*h + a;
69 return as_scalar(cg.forward(y_pred));
70 }
71};
72
73void WriteToFile(string& filename, ParameterCollection& dynet_model) {

Callers 1

mainFunction · 0.80

Calls 5

as_scalarFunction · 0.85
inputFunction · 0.50
tanhFunction · 0.50
sizeMethod · 0.45
forwardMethod · 0.45

Tested by

no test coverage detected