# tf.contrib.framework.VariableDeviceChooser

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/framework/python/ops/variables.py#L769-L816) |

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.

<br />

<br />

<br />

| ## 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. |

<br />

## Methods

### `__call__`

[View source](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/framework/python/ops/variables.py#L806-L816)

    __call__(
        op
    )

Call self as a function.