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

Function CrossEntropyFwd

src/core/tensor/tensor.cc:1711–1715  ·  view source on GitHub ↗

Misc.

Source from the content-addressed store, hash-verified

1709// Misc.
1710// ************************
1711Tensor CrossEntropyFwd(const Tensor &p, const Tensor &t) {
1712 Tensor loss({p.shape(0)}, p.device(), p.data_type());
1713 ComputeCrossEntropy(p, t, &loss);
1714 return loss;
1715}
1716
1717Tensor SoftmaxCrossEntropyBwd(const Tensor &p, const Tensor &t) {
1718 Tensor g = p.Clone();

Callers 1

TESTFunction · 0.85

Calls 4

shapeMethod · 0.80
deviceMethod · 0.80
data_typeMethod · 0.80
ComputeCrossEntropyFunction · 0.70

Tested by 1

TESTFunction · 0.68