MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / test_train_eval

Method test_train_eval

python/oneflow/test/modules/test_module.py:258–264  ·  view source on GitHub ↗
(test_case)

Source from the content-addressed store, hash-verified

256
257 @flow.unittest.skip_unless_1n1d()
258 def test_train_eval(test_case):
259 m = flow.nn.Module()
260 test_case.assertEqual(m.training, True)
261 m.train()
262 test_case.assertEqual(m.training, True)
263 m.eval()
264 test_case.assertEqual(m.training, False)
265
266 @flow.unittest.skip_unless_1n1d()
267 def test_module_setattr(test_case):

Callers

nothing calls this directly

Calls 2

trainMethod · 0.95
evalMethod · 0.95

Tested by

no test coverage detected