Defines the computation performed in every forward propagation. Should be overridden by all subclasses. Args: *input: the input training data for the model Returns: out: the outputs of the forward propagation.
(self, *input)
| 207 | self.sequential = sequential |
| 208 | |
| 209 | def forward(self, *input): |
| 210 | """Defines the computation performed in every forward propagation. |
| 211 | |
| 212 | Should be overridden by all subclasses. |
| 213 | |
| 214 | Args: |
| 215 | *input: the input training data for the model |
| 216 | |
| 217 | Returns: |
| 218 | out: the outputs of the forward propagation. |
| 219 | """ |
| 220 | raise NotImplementedError |
| 221 | |
| 222 | def train_one_batch(self, *input, **kwargs): |
| 223 | """Defines the computation performed in every training iteration |