-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Incremental Learning\Training #678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It is definitely possible using the low-level API: some linear models can be 'incrementally trained' using 'initial predictor' to initialize themselves. In #653 there is a code sample (look for We are working on making a high-level API that would support such a scenario: see #584 for the list of things we want to enable. For instance, this is how currently (in my local branch) I perform incremental training: // Pipeline.
var pipeline = new MyTextLoader(env, MakeSentimentTextLoaderArgs())
.Append(new MyTextTransform(env, MakeSentimentTextTransformArgs()));
// Train the pipeline, prepare train set.
var reader = pipeline.Fit(new MultiFileSource(dataPath));
var trainData = reader.Read(new MultiFileSource(dataPath));
// Train the first predictor.
var trainer = new MySdca(env, new LinearClassificationTrainer.Arguments
{
NumThreads = 1
}, "Features", "Label");
var firstPredictor = trainer.Fit(trainData);
// Train the second predictor on the same data.
var secondTrainer = new MyAveragedPerceptron(env, new AveragedPerceptronTrainer.Arguments(), "Features", "Label");
var finalPredictor = secondTrainer.Train(trainData, firstPredictor.InnerModel); |
Thank you this is very helpful 👍 will take a look. |
Is there a possibility of adding incremental training a model?
The text was updated successfully, but these errors were encountered: