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

Function ReadVariableOp

tensorflow/go/op/wrappers.go:24802–24816  ·  view source on GitHub ↗

Reads the value of a variable. The tensor returned by this operation is immutable. The value returned by this operation is guaranteed to be influenced by all the writes on which this operation depends directly or indirectly, and to not be influenced by any of the writes which depend directly or in

(scope *Scope, resource tf.Output, dtype tf.DataType)

Source from the content-addressed store, hash-verified

24800// resource: handle to the resource in which to store the variable.
24801// dtype: the dtype of the value.
24802func ReadVariableOp(scope *Scope, resource tf.Output, dtype tf.DataType) (value tf.Output) {
24803 if scope.Err() != nil {
24804 return
24805 }
24806 attrs := map[string]interface{}{"dtype": dtype}
24807 opspec := tf.OpSpec{
24808 Type: "ReadVariableOp",
24809 Input: []tf.Input{
24810 resource,
24811 },
24812 Attrs: attrs,
24813 }
24814 op := scope.AddOperation(opspec)
24815 return op.Output(0)
24816}
24817
24818// ResourceSparseApplyFtrlV2Attr is an optional argument to ResourceSparseApplyFtrlV2.
24819type ResourceSparseApplyFtrlV2Attr func(optionalAttr)

Callers 1

TestControlDependenciesFunction · 0.70

Calls 3

ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 1

TestControlDependenciesFunction · 0.56