device

dragon.vm.tensorflow.device(device_name)[source]

Context-manager to nest the the device spec.

Examples:

with tf.device('/gpu:0'):
    x = tf.constant(1)
Parameters:
  • device_name (str) – The device descriptor.
Returns:

Dict – The current default device spec.