(self)
| 456 | self.assertEquals(0, ctx.num_gpus()) |
| 457 | |
| 458 | def testPickle(self): |
| 459 | tmp_dir = self.get_temp_dir() |
| 460 | fname = os.path.join(tmp_dir, 't.pickle') |
| 461 | with open(fname, 'wb') as f: |
| 462 | t = constant_op.constant(10.0) |
| 463 | pickle.dump(t, f) |
| 464 | |
| 465 | with open(fname, 'rb') as f: |
| 466 | t = pickle.load(f) |
| 467 | self.assertAllEqual(t.numpy(), 10.0) |
| 468 | |
| 469 | @test_util.run_gpu_only |
| 470 | def testDevicePlacementEnforcesConsistency(self): |
nothing calls this directly
no test coverage detected