Return the reduction indices for computing gradients of s0 op s1 with broadcast. This is typically used by gradient computations for a broadcasting operation.
(scope *Scope, s0 tf.Output, s1 tf.Output)
| 42565 | // |
| 42566 | // This is typically used by gradient computations for a broadcasting operation. |
| 42567 | func BroadcastGradientArgs(scope *Scope, s0 tf.Output, s1 tf.Output) (r0 tf.Output, r1 tf.Output) { |
| 42568 | if scope.Err() != nil { |
| 42569 | return |
| 42570 | } |
| 42571 | opspec := tf.OpSpec{ |
| 42572 | Type: "BroadcastGradientArgs", |
| 42573 | Input: []tf.Input{ |
| 42574 | s0, s1, |
| 42575 | }, |
| 42576 | } |
| 42577 | op := scope.AddOperation(opspec) |
| 42578 | return op.Output(0), op.Output(1) |
| 42579 | } |
| 42580 | |
| 42581 | // Returns the cardinality of `input_dataset`. |
| 42582 | // |