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

Method testNoDevice

tensorflow/python/framework/ops_test.py:1448–1455  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1446class DeviceTest(test_util.TensorFlowTestCase):
1447
1448 def testNoDevice(self):
1449 g = ops.Graph()
1450 op = g.create_op("FloatOutput", [], [dtypes.float32])
1451 self.assertDeviceEqual(None, op.device)
1452 gd = g.as_graph_def()
1453 self.assertProtoEqualsVersion("""
1454 node { name: "FloatOutput" op: "FloatOutput" }
1455 """, gd)
1456
1457 def testEagerBackingDevice(self):
1458 with context.eager_mode():

Callers

nothing calls this directly

Calls 5

create_opMethod · 0.95
as_graph_defMethod · 0.95
assertDeviceEqualMethod · 0.80
GraphMethod · 0.45

Tested by

no test coverage detected