def __call__(self, inputs):
inputs, restore = wrap(inputs)
x = inputs
x = self._preprocess(x)
x = ep.astensor(self._model(x.tensor))
return restore(x)
def transform_bounds(self, bounds, inplace=False):
Returns a new model with the desired bounds and updates the preprocessing accordingly
// more efficient than the base class implementation because it avoids the additional wrapper
After Change
return self._dummy
def __call__(self, inputs: T) -> T:
x, restore_type = ep.astensor_(inputs)
y = self._preprocess(x)
z = ep.astensor(self._model(y.raw))
return restore_type(z)