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)
| 14413 | // of all ops using this variable. |
| 14414 | // shape: The (possibly partially specified) shape of this variable. |
| 14415 | func 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. |
| 14433 | type ResourceSparseApplyProximalAdagradAttr func(optionalAttr) |