# Creating the benchmark (scenario object)
split_mnist = SplitMNIST(
n_experiences=5,
seed=3,
)
# Train and test streams
train_stream = split_mnist.train_stream
test_stream = split_mnist.test_stream
# Iterate over the train stream
for experience in train_stream:
print(f"Start of task {experience.task_label}")
print(f"Classes in this task: {experience.classes_in_this_experience}")
# Retrieve the current PyTorch training set through the experience
current_training_set = experience.dataset
print(f"This task contains {len(current_training_set)} training examples")
# Recover the corresponding test experience in the test stream
print(f"Current experience {experience.current_experience}")
current_test_set = test_stream[experience.current_experience].dataset
print(f"This task contains {len(current_test_set)} test examples")
For every experience, the first print statement prints
Start of task 0
But the current experience print statement correctly updates experience.current_experience from 0 all the way to 4.
It is unclear to me what an experience is because of this behaviour and because of what is written on the Avalanche website:
Experiences are batch of data (or "tasks") that can be provided with or without a specific task label.
For every experience, the first print statement prints
Start of task 0
But the current experience print statement correctly updatesexperience.current_experience
from 0 all the way to 4.It is unclear to me what an experience is because of this behaviour and because of what is written on the Avalanche website: