Skip to content

How to continue training a fitted model? #154

@travis-leith

Description

@travis-leith

I want to use torch to create a custom driver for a concomitant model for flexmix.

The way a flexmix model works is that the individual clusters are fit, then the concomitant model is fit using the individual clusters fit, then the individual clusters are fit using the concomitant fit, etc. Eventually it stabilizes and the whole thing can be considered as fitted.

I want to try make the concomitant model stateful. Instead of refitting the concomitant model at each step, I would like to resume training from the previous concomitant step.

If I have a fitted model as in

fitted <- net %>%
  setup(
    loss = function(y_hat, y_true) nnf_cross_entropy(y_hat, y_true),
    optimizer = optim_adam
  ) %>%
  fit(train_ds, epochs = 10)

How do I pick up from fitted and continue training?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions