Build a list of writers to be used. By default it contains writers that write metrics to the screen, a json file, and a tensorboard event file respectively. If you'd like a different list of writers, you can overwrite it in your trainer. Returns:
(self)
| 382 | return ret |
| 383 | |
| 384 | def build_writers(self): |
| 385 | """ |
| 386 | Build a list of writers to be used. By default it contains |
| 387 | writers that write metrics to the screen, |
| 388 | a json file, and a tensorboard event file respectively. |
| 389 | If you'd like a different list of writers, you can overwrite it in |
| 390 | your trainer. |
| 391 | |
| 392 | Returns: |
| 393 | list[EventWriter]: a list of :class:`EventWriter` objects. |
| 394 | |
| 395 | It is now implemented by: |
| 396 | :: |
| 397 | return [ |
| 398 | CommonMetricPrinter(self.max_iter), |
| 399 | JSONWriter(os.path.join(self.cfg.OUTPUT_DIR, "metrics.json")), |
| 400 | TensorboardXWriter(self.cfg.OUTPUT_DIR), |
| 401 | ] |
| 402 | |
| 403 | """ |
| 404 | # Here the default print/log frequency of each writer is used. |
| 405 | return [ |
| 406 | # It may not always print what you want to see, since it prints "common" metrics only. |
| 407 | CommonMetricPrinter(self.max_iter), |
| 408 | JSONWriter(os.path.join(self.cfg.OUTPUT_DIR, "metrics.json")), |
| 409 | TensorboardXWriter(self.cfg.OUTPUT_DIR), |
| 410 | ] |
| 411 | |
| 412 | def train(self): |
| 413 | """ |
no test coverage detected