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

Function GuaranteeConst

tensorflow/go/op/wrappers.go:32398–32410  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

32396//
32397// Returns the input tensor without modification.
32398func 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//

Callers 1

TESTFunction · 0.85

Calls 3

ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 1

TESTFunction · 0.68