ContinualAI / ContinualAI/avalanche
DataType error when computing dataset logits in DER Task-Incremental scenario
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
When training a multi-head module with DER there seems to be a bug as the `compute_dataset_logits()` function is expected to return a tensor, but seemingly creates a dictionary.
To replicate, simply run the [multihead.py](https://github.com/ContinualAI/avalanche/blob/master/examples/multihead.py) with the DER strategy.
I tried fixing the problem by adding a check on the aforementioned function to see if a dictionary is being generated as the output of the model and to convert the dictionary values into the desired data type (lines 48 to 52 on [der.py](https://github.com/ContinualAI/avalanche/blob/master/avalanche/training/supervised/der.py)):
```
if(isinstance(out,dict)):
out = out.values()
out = list(out)[0]
```
but sometimes this conversion yields tensors with seemingly random sizes ([128,6] or [128,9] instead of the expected [128,10])
Contributor guide
Assessment
This issue has not been assessed yet.