16 lines
349 B
Python
16 lines
349 B
Python
from image_prediction.utils import get_logger
|
|
|
|
logger = get_logger()
|
|
|
|
|
|
class EstimatorAdapter:
|
|
def __init__(self, estimator):
|
|
self.estimator = estimator
|
|
|
|
def predict(self, batch):
|
|
return self.estimator(batch)
|
|
|
|
def __call__(self, batch):
|
|
logger.debug("EstimatorAdapter.predict")
|
|
return self.predict(batch)
|