Provide default implementation based on preprocess_cfg and user can reimplement it
(self, inputs: Input, **preprocess_params)
| 411 | f'those {missing_keys} are missing') |
| 412 | |
| 413 | def preprocess(self, inputs: Input, **preprocess_params) -> Dict[str, Any]: |
| 414 | """ Provide default implementation based on preprocess_cfg and user can reimplement it |
| 415 | """ |
| 416 | assert self.preprocessor is not None, 'preprocess method should be implemented' |
| 417 | assert not isinstance(self.preprocessor, List),\ |
| 418 | 'default implementation does not support using multiple preprocessors.' |
| 419 | return self.preprocessor(inputs, **preprocess_params) |
| 420 | |
| 421 | def forward(self, inputs: Dict[str, Any], |
| 422 | **forward_params) -> Dict[str, Any]: |
no test coverage detected