def setUp(self):
   test_util.set_logical_devices_to_at_least("CPU", 3)
   super(LossUtilitiesTest, self).setUp()
def _setup_context():
    context._reset_context()
    test_util.set_logical_devices_to_at_least('CPU', 4)
    context.ensure_initialized()
예제 #3
0
 def setUp(self):
     test_util.set_logical_devices_to_at_least('CPU', 3)
     super(AutoCastVariableTest, self).setUp()
예제 #4
0
def set_virtual_cpus_to_at_least(num_virtual_cpus):
    test_util.set_logical_devices_to_at_least("CPU", num_virtual_cpus)
예제 #5
0
 def testLogicalCPUs(self):
     context._reset_context()
     test_util.set_logical_devices_to_at_least('CPU', 3)
     cpu_device = config.list_physical_devices('CPU')[0]
     self.assertLen(config.get_logical_device_configuration(cpu_device), 3)