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

Function L2Loss

tensorflow/go/op/wrappers.go:30167–30179  ·  view source on GitHub ↗

L2 Loss. Computes half the L2 norm of a tensor without the `sqrt`: output = sum(t ** 2) / 2 Arguments: t: Typically 2-D, but may have any dimensions. Returns 0-D.

(scope *Scope, t tf.Output)

Source from the content-addressed store, hash-verified

30165//
30166// Returns 0-D.
30167func L2Loss(scope *Scope, t tf.Output) (output tf.Output) {
30168 if scope.Err() != nil {
30169 return
30170 }
30171 opspec := tf.OpSpec{
30172 Type: "L2Loss",
30173 Input: []tf.Input{
30174 t,
30175 },
30176 }
30177 op := scope.AddOperation(opspec)
30178 return op.Output(0)
30179}
30180
30181// Multiplies sparse updates into the variable referenced by `resource`.
30182//

Callers 1

TEST_FFunction · 0.85

Calls 3

ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 1

TEST_FFunction · 0.68