MCPcopy Create free account
hub / github.com/pytorch/pytorch / check_optimizer

Method check_optimizer

caffe2/python/optimizer_test.py:73–78  ·  view source on GitHub ↗
(self, optimizer)

Source from the content-addressed store, hash-verified

71 )
72
73 def check_optimizer(self, optimizer):
74 self.assertTrue(optimizer.get_auxiliary_parameters().shared)
75 self.assertFalse(optimizer.get_auxiliary_parameters().local)
76 for param in optimizer.get_auxiliary_parameters().shared:
77 tensor = workspace.FetchBlob(param)
78 np.testing.assert_allclose(np.array([1.0]), tensor, atol=1e-5)
79
80 @unittest.skipIf(not workspace.has_gpu_support, "No GPU support")
81 def testGPUDense(self):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected