Skip to content
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

Unable to use ICarL for domain incremental scenario on my dataset in "paths_benchmark" #1645

Open
2017csz0006 opened this issue May 14, 2024 · 0 comments

Comments

@2017csz0006
Copy link

from avalanche.models.icarl_resnet import *
from avalanche.training.supervised import ICaRL

my_model=IcarlNet(num_classes=2)
my_feature_extractor=my_model.feature_extractor
my_classifier=my_model.classifier

optimizer=Adam(my_model.parameters(), lr=piku_lr)
criterion = BCEWithLogitsLoss()
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

cl_strategy = ICaRL(
feature_extractor=my_feature_extractor,
classifier=my_classifier,
optimizer=optimizer,
memory_size=200,
buffer_transform=None,
fixed_memory=True,
train_mb_size=64, train_epochs=30, eval_mb_size=64,
evaluator=eval_plugin,
device=device
)

I am getting error as below:

File ~/anaconda3/envs/my_pytorch/lib/python3.10/site-packages/avalanche/training/supervised/icarl.py:159 in before_training_exp
nb_cl = benchmark.n_classes_per_exp[tid]

AttributeError: 'ClassificationScenario' object has no attribute 'n_classes_per_exp'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant