11 lines
203 B
Python
11 lines
203 B
Python
import abc
|
|
|
|
|
|
class Preprocessor(abc.ABC):
|
|
@abc.abstractmethod
|
|
def preprocess(self, batch):
|
|
raise NotImplementedError
|
|
|
|
def __call__(self, batch):
|
|
return self.preprocess(batch)
|