Stream Accuracy approximation #739
-
Hi, doing some experiments I noticed that in the logs the average of the experience accuracies is not the same as the stream accuracy. For example: > Eval on experience 0 (Task 0) from test stream ended.
Top1_Acc_Exp/eval_phase/test_stream/Task000/Exp000 = 0.9536
> Eval on experience 1 (Task 0) from test stream ended.
Top1_Acc_Exp/eval_phase/test_stream/Task000/Exp001 = 0.9671
> Eval on experience 2 (Task 0) from test stream ended.
Top1_Acc_Exp/eval_phase/test_stream/Task000/Exp002 = 0.0000
> Eval on experience 3 (Task 0) from test stream ended.
Top1_Acc_Exp/eval_phase/test_stream/Task000/Exp003 = 0.0000
> Eval on experience 4 (Task 0) from test stream ended.
Top1_Acc_Exp/eval_phase/test_stream/Task000/Exp004 = 0.0000
-- >> End of eval phase << --
Top1_Acc_Stream/eval_phase/test_stream/Task000 = 0.3727 I expected a test_stream = (0.9536 + 0.9671) / 5 = 0.38684 and not 0.3727 If you want to reproduce it I ran the cl_strategy = Naive(model, torch.optim.Adam(model.parameters(), lr=0.001),
CrossEntropyLoss(),
train_mb_size=10, train_epochs=1, eval_mb_size=100,
device=device,
plugins=[ReplayPlugin(mem_size=100)],
evaluator=eval_plugin
) Thanks for your help :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Which benchmark are you using? |
Beta Was this translation helpful? Give feedback.
-
Hi @MattiaSangermano , thanks for reporting! I will look into this and let you know. |
Beta Was this translation helpful? Give feedback.
Which benchmark are you using?
Top1_Acc_Stream
should average over the number of patterns, not the number of experiences. If the experiences have the same number of samples, your computations are exact.