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)
| 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. |
no outgoing calls