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()
def setUp(self): test_util.set_logical_devices_to_at_least('CPU', 3) super(AutoCastVariableTest, self).setUp()
def set_virtual_cpus_to_at_least(num_virtual_cpus): test_util.set_logical_devices_to_at_least("CPU", num_virtual_cpus)
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)