MCPcopy Create free account
hub / github.com/apache/singa / Forward

Method Forward

include/singa/model/layer.h:103–107  ·  view source on GitHub ↗

Do feature transformation for the given 'input' tensor (denoted as x). 'flag' is either kTrain or kEval for feed-forward nets, and would be used for other phases of training other nets. For example, when training RBM, we may create an alias of this function as ComputeFeature where flag could be kPositive and kNegative. It will return a Tensor (denoted as y). If the 'input' or 'output' is required

Source from the content-addressed store, hash-verified

101 /// If the 'input' or 'output' is required for computing the gradients in
102 /// Backward(), then buffer them as internal data.
103 virtual const Tensor Forward(int flag, const Tensor& input) {
104 LOG(FATAL) << "Not implemented";
105 Tensor t;
106 return t;
107 }
108
109 /// \copydoc Forward(int flag, const Tensor& input)
110 /// Accept multiple input tensors and generate multiple output tensors.

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected