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

Error while running scripts for "Tissuemnist" and "Organamnist" benchmark #2

Open
Muhammad-Huzaifaa opened this issue Dec 28, 2022 · 1 comment

Comments

@Muhammad-Huzaifaa
Copy link

Scripts used for running:

bash ./script_tissuemnist.sh ewc 0 fixd ../resutls/tissuemnist
bash ./script_organamnist.sh ewc 0 fixd ../resutls/organamnist

Error Message:

Using downloaded and verified file: ../data/tissuemnist/tissuemnist.npz
Using downloaded and verified file: ../data/tissuemnist/tissuemnist.npz
[(0, 2), (1, 2), (2, 2), (3, 2)]


Task 0


Traceback (most recent call last):
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/main_incremental.py", line 348, in
main()
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/main_incremental.py", line 294, in main
appr.train(t, trn_loader[t], val_loader[t])
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/approach/incremental_learning.py", line 56, in train
self.train_loop(t, trn_loader, val_loader)
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/approach/ewc.py", line 112, in train_loop
super().train_loop(t, trn_loader, val_loader)
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/approach/incremental_learning.py", line 111, in train_loop
self.train_epoch(t, trn_loader)
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/approach/incremental_learning.py", line 170, in train_epoch
outputs = self.model(images.to(self.device))
File "/home/muhammad.huzaifa/.conda/envs/lifelonger/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/muhammad.huzaifa/Documents/LifeLonger/src/networks/network.py", line 67, in forward
x = self.model(x)
File "/home/muhammad.huzaifa/.conda/envs/lifelonger/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/muhammad.huzaifa/.conda/envs/lifelonger/lib/python3.8/site-packages/torchvision/models/resnet.py", line 220, in forward
return self._forward_impl(x)
File "/home/muhammad.huzaifa/.conda/envs/lifelonger/lib/python3.8/site-packages/torchvision/models/resnet.py", line 203, in _forward_impl
x = self.conv1(x)
File "/home/muhammad.huzaifa/.conda/envs/lifelonger/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/muhammad.huzaifa/.conda/envs/lifelonger/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 423, in forward
return self._conv_forward(input, self.weight)
File "/home/muhammad.huzaifa/.conda/envs/lifelonger/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 419, in _conv_forward
return F.conv2d(input, weight, self.bias, self.stride,
RuntimeError: Given groups=1, weight of size [64, 3, 7, 7], expected input[32, 1, 32, 32] to have 3 channels, but got 1 channels instead

@samjavadinia
Copy link

you should change the dataset-config to have 'extend_channel': 3 inside those datasets config

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

2 participants