Closed sarahmish closed 2 years ago
In keras adapter, we build the model within the fit function, this entails that with every fit call we will rebuild the model and thus we cannot "continue" the process of training (i.e. call fit twice to train the same model).
keras
fit
https://github.com/MLBazaar/MLPrimitives/blob/19f00492cf8a73eb6f89f3146ec442257babfc6c/mlprimitives/adapters/keras.py#L101-L104
Is this the expected behavior? Or should there be a flag to indicate if this is the first call to fit, then build the model, otherwise continue
if not self._fitted: self._augment_hyperparameters(X, 'input', kwargs) self._augment_hyperparameters(y, 'target', kwargs) self.model = self._build_model(**kwargs)
Description
In
keras
adapter, we build the model within thefit
function, this entails that with everyfit
call we will rebuild the model and thus we cannot "continue" the process of training (i.e. callfit
twice to train the same model).https://github.com/MLBazaar/MLPrimitives/blob/19f00492cf8a73eb6f89f3146ec442257babfc6c/mlprimitives/adapters/keras.py#L101-L104
Is this the expected behavior? Or should there be a flag to indicate if this is the first call to
fit
, then build the model, otherwise continue