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

Function VarHandleOp

tensorflow/go/op/wrappers.go:14415–14430  ·  view source on GitHub ↗

Creates a handle to a Variable resource. Arguments: dtype: the type of this variable. Must agree with the dtypes of all ops using this variable. shape: The (possibly partially specified) shape of this variable.

(scope *Scope, dtype tf.DataType, shape tf.Shape, optional ...VarHandleOpAttr)

Source from the content-addressed store, hash-verified

14413// of all ops using this variable.
14414// shape: The (possibly partially specified) shape of this variable.
14415func VarHandleOp(scope *Scope, dtype tf.DataType, shape tf.Shape, optional ...VarHandleOpAttr) (resource tf.Output) {
14416 if scope.Err() != nil {
14417 return
14418 }
14419 attrs := map[string]interface{}{"dtype": dtype, "shape": shape}
14420 for _, a := range optional {
14421 a(attrs)
14422 }
14423 opspec := tf.OpSpec{
14424 Type: "VarHandleOp",
14425
14426 Attrs: attrs,
14427 }
14428 op := scope.AddOperation(opspec)
14429 return op.Output(0)
14430}
14431
14432// ResourceSparseApplyProximalAdagradAttr is an optional argument to ResourceSparseApplyProximalAdagrad.
14433type ResourceSparseApplyProximalAdagradAttr func(optionalAttr)

Calls 4

aClass · 0.85
ErrMethod · 0.45
AddOperationMethod · 0.45
OutputMethod · 0.45

Tested by 2

TestControlDependenciesFunction · 0.56