MCPcopy Create free account
hub / github.com/Tencent/NeuralNLP-NeuralClassifier / ModeType

Class ModeType

util.py:28–41  ·  view source on GitHub ↗

Standard names for model modes. The following standard keys are defined: * `TRAIN`: training mode. * `EVAL`: evaluation mode. * `PREDICT`: inference mode.

Source from the content-addressed store, hash-verified

26
27
28class 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
44class Logger(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected