Gives a guarantee to the TF runtime that the input tensor is a constant. The runtime is then free to make optimizations based on this. Only accepts value typed tensors as inputs and rejects resource variable handles as input. Returns the input tensor without modification.
(scope *Scope, input tf.Output)
| 32396 | // |
| 32397 | // Returns the input tensor without modification. |
| 32398 | func GuaranteeConst(scope *Scope, input tf.Output) (output tf.Output) { |
| 32399 | if scope.Err() != nil { |
| 32400 | return |
| 32401 | } |
| 32402 | opspec := tf.OpSpec{ |
| 32403 | Type: "GuaranteeConst", |
| 32404 | Input: []tf.Input{ |
| 32405 | input, |
| 32406 | }, |
| 32407 | } |
| 32408 | op := scope.AddOperation(opspec) |
| 32409 | return op.Output(0) |
| 32410 | } |
| 32411 | |
| 32412 | // Computes hyperbolic tangent of `x` element-wise. |
| 32413 | // |