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

Method step_fn

official/modeling/multitask/base_trainer.py:159–167  ·  view source on GitHub ↗
(inputs)

Source from the content-addressed store, hash-verified

157 """
158
159 def step_fn(inputs):
160 losses = self.multi_task.joint_train_step(
161 inputs,
162 multi_task_model=self.multi_task_model,
163 optimizer=self.optimizer,
164 task_metrics=self.training_metrics)
165 for key, loss in losses.items():
166 self.training_losses[key].update_state(loss)
167 self.global_step.assign_add(1)
168
169 self.strategy.run(
170 step_fn, args=(tf.nest.map_structure(next, iterator_map),))

Callers

nothing calls this directly

Calls 2

joint_train_stepMethod · 0.80
update_stateMethod · 0.45

Tested by

no test coverage detected