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)
| 24800 | // resource: handle to the resource in which to store the variable. |
| 24801 | // dtype: the dtype of the value. |
| 24802 | func 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. |
| 24819 | type ResourceSparseApplyFtrlV2Attr func(optionalAttr) |