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)
| 30165 | // |
| 30166 | // Returns 0-D. |
| 30167 | func 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 | // |