MCPcopy Create free account
hub / github.com/benoitsteiner/tensorflow-opencl / device

Function device

tensorflow/python/eager/context.py:422–442  ·  view source on GitHub ↗

Context-manager to force placement of operations and Tensors on a device. Example: ```python with tfe.device('gpu:0'): with tfe.device('cpu:0'): shape = tf.constant([], dtype=tf.int32) x = tf.truncated_normal(shape, tf.float32) ``` will ensure that the `shape` Tensor is on C

(name)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 2

contextFunction · 0.85
deviceMethod · 0.45

Tested by

no test coverage detected