MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / LogSoftmax

Function LogSoftmax

tensorflow/go/op/wrappers.go:42101–42113  ·  view source on GitHub ↗

Computes log softmax activations. For each batch `i` and class `j` we have logsoftmax[i, j] = logits[i, j] - log(sum(exp(logits[i]))) Arguments: logits: 2-D with shape `[batch_size, num_classes]`. Returns Same shape as `logits`.

(scope *Scope, logits tf.Output)

Source from the content-addressed store, hash-verified

42099//
42100// Returns Same shape as `logits`.
42101func LogSoftmax(scope *Scope, logits tf.Output) (logsoftmax tf.Output) {
42102 if scope.Err() != nil {
42103 return
42104 }
42105 opspec := tf.OpSpec{
42106 Type: "LogSoftmax",
42107 Input: []tf.Input{
42108 logits,
42109 },
42110 }
42111 op := scope.AddOperation(opspec)
42112 return op.Output(0)
42113}
42114
42115// Returns the next record (key, value pair) produced by a Reader.
42116//

Callers 3

TEST_FFunction · 0.50
TEST_FFunction · 0.50

Calls 3

ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 2

TEST_FFunction · 0.40
TEST_FFunction · 0.40