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
| 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. |