Return a tensor with the same shape and contents as the input tensor or value.
(scope *Scope, input tf.Output)
| 24201 | |
| 24202 | // Return a tensor with the same shape and contents as the input tensor or value. |
| 24203 | func Identity(scope *Scope, input tf.Output) (output tf.Output) { |
| 24204 | if scope.Err() != nil { |
| 24205 | return |
| 24206 | } |
| 24207 | opspec := tf.OpSpec{ |
| 24208 | Type: "Identity", |
| 24209 | Input: []tf.Input{ |
| 24210 | input, |
| 24211 | }, |
| 24212 | } |
| 24213 | op := scope.AddOperation(opspec) |
| 24214 | return op.Output(0) |
| 24215 | } |
| 24216 | |
| 24217 | // Computes softmax cross entropy cost and gradients to backpropagate. |
| 24218 | // |
no test coverage detected