tf.raw_ops.VarHandleOp
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Creates a handle to a Variable resource.
View aliases
Compat aliases for migration
See
Migration guide for
more details.
tf.compat.v1.raw_ops.VarHandleOp
tf.raw_ops.VarHandleOp(
dtype,
shape,
container='',
shared_name='',
debug_name='',
allowed_devices=[],
name=None
)
Args |
dtype
|
A tf.DType . the type of this variable. Must agree with the dtypes
of all ops using this variable.
|
shape
|
A tf.TensorShape or list of ints .
The (possibly partially specified) shape of this variable.
|
container
|
An optional string . Defaults to "" .
the container this variable is placed in.
|
shared_name
|
An optional string . Defaults to "" .
the name by which this variable is referred to.
|
debug_name
|
An optional string . Defaults to "" .
the user-given name, which still applies in anonymous mode.
|
allowed_devices
|
An optional list of strings . Defaults to [] .
DEPRECATED. The allowed devices containing the resource variable. Set when the
output ResourceHandle represents a per-replica/partitioned resource variable.
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor of type resource .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.VarHandleOp\n\n\u003cbr /\u003e\n\nCreates a handle to a Variable resource.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.VarHandleOp`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/VarHandleOp)\n\n\u003cbr /\u003e\n\n tf.raw_ops.VarHandleOp(\n dtype,\n shape,\n container='',\n shared_name='',\n debug_name='',\n allowed_devices=[],\n name=None\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `dtype` | A [`tf.DType`](../../tf/dtypes/DType). the type of this variable. Must agree with the dtypes of all ops using this variable. |\n| `shape` | A [`tf.TensorShape`](../../tf/TensorShape) or list of `ints`. The (possibly partially specified) shape of this variable. |\n| `container` | An optional `string`. Defaults to `\"\"`. the container this variable is placed in. |\n| `shared_name` | An optional `string`. Defaults to `\"\"`. the name by which this variable is referred to. |\n| `debug_name` | An optional `string`. Defaults to `\"\"`. the user-given name, which still applies in anonymous mode. |\n| `allowed_devices` | An optional list of `strings`. Defaults to `[]`. DEPRECATED. The allowed devices containing the resource variable. Set when the output ResourceHandle represents a per-replica/partitioned resource variable. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` of type `resource`. ||\n\n\u003cbr /\u003e"]]