tf.config.LogicalDeviceConfiguration
Stay organized with collections
Save and categorize content based on your preferences.
Configuration class for a logical devices.
tf.config.LogicalDeviceConfiguration(
memory_limit=None
)
The class specifies the parameters to configure a tf.config.PhysicalDevice
as it is initialized to a tf.config.LogicalDevice
during runtime
initialization. Not all fields are valid for all device types.
See tf.config.get_logical_device_configuration
and
tf.config.set_logical_device_configuration
for usage examples.
Fields:
memory_limit
: (optional) Maximum memory (in MB) to allocate on the virtual
device. Currently only supported for GPUs.
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.config.LogicalDeviceConfiguration\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/eager/context.py#L259-L276) |\n\nConfiguration class for a logical devices.\n\n#### View aliases\n\n\n**Main aliases**\n\n[`tf.config.experimental.VirtualDeviceConfiguration`](/api_docs/python/tf/config/LogicalDeviceConfiguration)\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.config.LogicalDeviceConfiguration`](/api_docs/python/tf/config/LogicalDeviceConfiguration), [`tf.compat.v1.config.experimental.VirtualDeviceConfiguration`](/api_docs/python/tf/config/LogicalDeviceConfiguration)\n\n\u003cbr /\u003e\n\n tf.config.LogicalDeviceConfiguration(\n memory_limit=None\n )\n\nThe class specifies the parameters to configure a [`tf.config.PhysicalDevice`](../../tf/config/PhysicalDevice)\nas it is initialized to a [`tf.config.LogicalDevice`](../../tf/config/LogicalDevice) during runtime\ninitialization. Not all fields are valid for all device types.\n\nSee [`tf.config.get_logical_device_configuration`](../../tf/config/get_logical_device_configuration) and\n[`tf.config.set_logical_device_configuration`](../../tf/config/set_logical_device_configuration) for usage examples.\n\n#### Fields:\n\n- **`memory_limit`**: (optional) Maximum memory (in MB) to allocate on the virtual device. Currently only supported for GPUs.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|----------------|---------------|\n| `memory_limit` | \u003cbr /\u003e \u003cbr /\u003e |\n\n\u003cbr /\u003e"]]