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

Method inference_step

official/core/base_task.py:311–323  ·  view source on GitHub ↗

Performs the forward step. With distribution strategies, this method runs on devices. Args: inputs: a dictionary of input tensors. model: the keras.Model. Returns: Model outputs.

(self, inputs, model: tf_keras.Model)

Source from the content-addressed store, hash-verified

309 return logs
310
311 def inference_step(self, inputs, model: tf_keras.Model):
312 """Performs the forward step.
313
314 With distribution strategies, this method runs on devices.
315
316 Args:
317 inputs: a dictionary of input tensors.
318 model: the keras.Model.
319
320 Returns:
321 Model outputs.
322 """
323 return model(inputs, training=False)
324
325 def aggregate_logs(self, state, step_logs):
326 """Optional aggregation over logs returned from a validation step.

Callers 2

validation_stepMethod · 0.95
serveMethod · 0.45

Calls

no outgoing calls

Tested by 1

serveMethod · 0.36