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

Method Forward

src/model/layer/softmax.cc:32–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32const Tensor Softmax::Forward(int flag, const Tensor& input) {
33 CHECK_LE(input.nDim(), 2u);
34 Tensor output = SoftMax(input);
35 if (flag & kTrain)
36 buf_.push(output);
37 return output;
38}
39
40const std::pair<Tensor, vector<Tensor>> Softmax::Backward(int flag,
41 const Tensor& grad) {

Callers

nothing calls this directly

Calls 3

nDimMethod · 0.80
SoftMaxFunction · 0.50
pushMethod · 0.45

Tested by

no test coverage detected