Standard names for model modes. The following standard keys are defined: * `TRAIN`: training mode. * `EVAL`: evaluation mode. * `PREDICT`: inference mode.
| 26 | |
| 27 | |
| 28 | class ModeType(Type): |
| 29 | """Standard names for model modes. |
| 30 | The following standard keys are defined: |
| 31 | * `TRAIN`: training mode. |
| 32 | * `EVAL`: evaluation mode. |
| 33 | * `PREDICT`: inference mode. |
| 34 | """ |
| 35 | TRAIN = 'train' |
| 36 | EVAL = 'eval' |
| 37 | PREDICT = 'infer' |
| 38 | |
| 39 | @classmethod |
| 40 | def str(cls): |
| 41 | return ",".join([cls.TRAIN, cls.EVAL, cls.PREDICT]) |
| 42 | |
| 43 | |
| 44 | class Logger(object): |
nothing calls this directly
no outgoing calls
no test coverage detected