MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / forward

Method forward

NLP/Text2SQL-BASELINE/text2sql/models/enc_dec.py:64–78  ·  view source on GitHub ↗

Args: inputs (TYPE): NULL labels (TYPE) Returns: TODO

(self, inputs, labels=None, db=None, is_train=True)

Source from the content-addressed store, hash-verified

62 use_align_loss=True)
63
64 def forward(self, inputs, labels=None, db=None, is_train=True):
65 """
66
67 Args:
68 inputs (TYPE): NULL
69 labels (TYPE)
70
71 Returns: TODO
72 """
73 if is_train:
74 assert labels is not None, "labels should not be None while training"
75 return self._train(inputs, labels)
76 else:
77 assert db is not None, "db should not be None while inferencing"
78 return self._inference(inputs, db)
79
80 def _train(self, inputs, labels):
81 """

Callers

nothing calls this directly

Calls 2

_trainMethod · 0.95
_inferenceMethod · 0.95

Tested by

no test coverage detected