Serves the dual purpose of both computing the metric on the current batch of inputs but also add the batch statistics to the overall accumulating metric state. Input arguments are the exact same as corresponding ``update`` method. The returned output is the exact same as the out
(self, *args, **kwargs)
| 189 | self.binary_cross_entropy.reset() |
| 190 | |
| 191 | def forward(self, *args, **kwargs): |
| 192 | """ |
| 193 | Serves the dual purpose of both computing the metric on the current batch of inputs but also |
| 194 | add the batch statistics to the overall accumulating metric state. |
| 195 | Input arguments are the exact same as corresponding ``update`` method. |
| 196 | The returned output is the exact same as the output of ``compute``. |
| 197 | """ |
| 198 | self.update(*args, **kwargs) |
| 199 | self.batch_metric.update(*args, **kwargs) |
| 200 | batch_result = self.batch_metric.compute() |
| 201 | self.batch_metric.reset() |
| 202 | return batch_result |
| 203 | |
| 204 | |
| 205 | class NRCE(RCE): |