tf.config.PhysicalDevice
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Abstraction for a locally visible physical device.
View aliases
Compat aliases for migration
See
Migration guide for
more details.
tf.compat.v1.config.PhysicalDevice
tf.config.PhysicalDevice(
name, device_type
)
TensorFlow can utilize various devices such as the CPU or multiple GPUs
for computation. Before initializing a local device for use, the user can
customize certain properties of the device such as it's visibility or memory
configuration.
Once a visible tf.config.PhysicalDevice
is initialized one or more
tf.config.LogicalDevice
objects are created. Use
tf.config.set_visible_devices
to configure the visibility of a physical
device and tf.config.set_logical_device_configuration
to configure multiple
tf.config.LogicalDevice
objects for a tf.config.PhysicalDevice
. This is
useful when separation between models is needed or to simulate a multi-device
environment.
Fields |
name
|
Unique identifier for device.
|
device_type
|
String declaring the type of device such as "CPU" or "GPU".
|
Attributes |
name
|
A namedtuple alias for field number 0
|
device_type
|
A namedtuple alias for field number 1
|
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 2022-11-04 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 2022-11-04 UTC."],[],[]]