MCPcopy Create free account
hub / github.com/tensorflow/models / test_trainer_train

Method test_trainer_train

official/core/base_trainer_test.py:188–193  ·  view source on GitHub ↗
(self, distribution)

Source from the content-addressed store, hash-verified

186
187 @combinations.generate(all_strategy_combinations())
188 def test_trainer_train(self, distribution):
189 with distribution.scope():
190 trainer = self.create_test_trainer(self._config)
191 logs = trainer.train(tf.convert_to_tensor(5, dtype=tf.int32))
192 self.assertIn('training_loss', logs)
193 self.assertIn('learning_rate', logs)
194
195 @combinations.generate(all_strategy_combinations())
196 def test_trainer_passing_datasets(self, distribution):

Callers

nothing calls this directly

Calls 2

create_test_trainerMethod · 0.95
trainMethod · 0.45

Tested by

no test coverage detected