MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / device

Function device

tensorflow/contrib/eager/python/examples/gan/mnist_test.py:38–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36
37
38def device():
39 return '/gpu:0' if tf.test.is_gpu_available() else '/cpu:0'
40
41
42class MnistEagerGanBenchmark(tf.test.Benchmark):

Callers 10

benchmark_trainMethod · 0.70
benchmark_generateMethod · 0.70
op_device_contextMethod · 0.50
OpKernelContextClass · 0.50
set_outputMethod · 0.50
AsProtoMethod · 0.50
DebugStringMethod · 0.50
CreateItemMethod · 0.50
InitRngWithRandomSeedFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected