tf.config.get_logical_device_configuration

Get the virtual device configuration for a tf.config.PhysicalDevice.

Returns the list of tf.config.LogicalDeviceConfiguration objects previously configured by a call to tf.config.set_logical_device_configuration.

For example:

physical_devices = tf.config.list_physical_devices('CPU')
assert len(physical_devices) == 1, "No CPUs found"
config