tf.contrib.framework.VariableDeviceChooser
Stay organized with collections
Save and categorize content based on your preferences.
Device chooser for variables.
tf.contrib.framework.VariableDeviceChooser(
num_tasks=0, job_name='ps', device_type='CPU', device_index=0, replica=None
)
When using a parameter server it will assign them in a round-robin fashion.
When not using a parameter server it allows GPU or CPU placement.
Args |
num_tasks
|
number of tasks.
|
job_name
|
String, a name for the parameter server job.
|
device_type
|
Optional device type string (e.g. "CPU" or "GPU")
|
device_index
|
int. Optional device index. If left unspecified, device
represents 'any' device_index.
|
Methods
__call__
View source
__call__(
op
)
Call self as a function.
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.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.framework.VariableDeviceChooser\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/framework/python/ops/variables.py#L769-L816) |\n\nDevice chooser for variables. \n\n tf.contrib.framework.VariableDeviceChooser(\n num_tasks=0, job_name='ps', device_type='CPU', device_index=0, replica=None\n )\n\nWhen using a parameter server it will assign them in a round-robin fashion.\nWhen not using a parameter server it allows GPU or CPU placement.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------------|----------------------------------------------------------------------------------------|\n| `num_tasks` | number of tasks. |\n| `job_name` | String, a name for the parameter server job. |\n| `device_type` | Optional device type string (e.g. \"CPU\" or \"GPU\") |\n| `device_index` | int. Optional device index. If left unspecified, device represents 'any' device_index. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `__call__`\n\n[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/framework/python/ops/variables.py#L806-L816) \n\n __call__(\n op\n )\n\nCall self as a function."]]