tf.contrib.learn.BaseEstimator.partial_fit(x=None, y=None, input_fn=None, steps=1, batch_size=None, monitors=None)
Incremental fit on a batch of samples.
This method is expected to be called several times consecutively on different or the same chunks of the dataset. This either can implement iterative training or out-of-core/online training.
This is especially useful when the whole dataset is too big to fit in memory at the same time. Or when model is taking long time to converge, and you want to split up training into subparts.
Args:
-
x: Matrix of shape [n_samples, n_features...]. Can be iterator that returns arrays of features. The training input samples for fitting the model. If set,input_fnmust beNone. -
y: Vector or matrix [n_samples] or [n_samples, n_outputs]. Can be iterator that returns array of targets. The training target values (class labels in classification, real numbers in regression). If set,input_fnmust beNone. -
input_fn: Input function. If set,x,y, andbatch_sizemust beNone. -
steps: Number of steps for which to train model. IfNone, train forever. -
batch_size: minibatch size to use on the input, defaults to first dimension ofx. Must beNoneifinput_fnis provided. -
monitors: List ofBaseMonitorsubclass instances. Used for callbacks inside the training loop.
Returns:
self, for chaining.
Raises:
-
ValueError: If at least one ofxandyis provided, andinput_fnis provided.
Please login to continue.