RuntimeError:
#1379
Replies: 1 comment
-
Hello @ZaidRZ , at a first glance this does not seem a problem related to avalanche. It seems that the input to the cross entropy is somewhat unexpected. I would suggest to either open an issue on the repo you are using or try to look a bit more into the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hi
I'm trying to rerun a code from GitHub using Avalanche with time series, the code is available in this link (https://github.com/fexed/CLforHSM/blob/main/wesad_train_test.py) but I got RuntimeError :
Traceback (most recent call last):
File "wesad_train_test.py", line 136, in
train_wesad(j, str(i))
File "wesad_train_test.py", line 111, in train_wesad
res = strategy.train(experience)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/base_sgd.py", line 130, in train
super().train(experiences, eval_streams, **kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/base.py", line 103, in train
self._before_training(**kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/base.py", line 229, in _before_training
trigger_plugins(self, "before_training", **kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/utils.py", line 35, in trigger_plugins
getattr(p, event)(strategy, **kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/base_sgd.py", line 362, in before_training
self._peval(strategy, **kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/base_sgd.py", line 388, in _peval
strategy.eval(el, **kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/base_sgd.py", line 145, in eval
super().eval(exp_list, **kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context
return func(*args, **kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/base.py", line 145, in eval
self._eval_exp(**kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/base_sgd.py", line 188, in _eval_exp
self.eval_epoch(**kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/base_sgd.py", line 270, in eval_epoch
self.loss = self.criterion()
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/avalanche/training/templates/supervised.py", line 150, in criterion
return self._criterion(self.mb_output, self.mb_y)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/torch/nn/modules/loss.py", line 1150, in forward
return F.cross_entropy(input, target, weight=self.weight,
File "/home/zaid/miniconda3/envs/zaid_ts/lib/python3.8/site-packages/torch/nn/functional.py", line 2846, in cross_entropy
return torch._C._nn.cross_entropy_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index, label_smoothing)
RuntimeError: "nll_loss_forward_reduce_cuda_kernel_2d_index" not implemented for 'Int'
Anyone can help in this situation.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions