Applicability of Avalanche library to regression problem? #867
-
Hi all, Here are my questions:
# define optimizer and loss function for training
optimizer = SGD(model.parameters(), lr=0.001, momentum=0.9)
criterion = MSELoss()
# Instantiate Continual learning strategy
strategy = Naive(
model, optimizer, criterion, train_mb_size=32, train_epochs=2,
eval_mb_size=32) Does base_strategy overwrite my criterion and applies
It doesn't look like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @highclef ! Yes, you can use Avalanche for regression. The Currently, the default logger used by the strategy returns the loss and the accuracy. In your case, you can either discard the accuracy values (since they are not meaningful for your problem) or, better, feed to the strategy your custom Hope this helps! |
Beta Was this translation helpful? Give feedback.
Hi @highclef ! Yes, you can use Avalanche for regression. The
MSELoss
you are passing is used as loss during the strategy execution, so it should work fine: theBaseStrategy
does not override your loss withCrossEntropyLoss
.Currently, the default logger used by the strategy returns the loss and the accuracy. In your case, you can either discard the accuracy values (since they are not meaningful for your problem) or, better, feed to the strategy your custom
EvaluationPlugin
instance with the metrics you want (take a look at this tutorial if you are not sure how to do this).Hope this helps!