ContinualAI / avalanche

Avalanche: an End-to-End Library for Continual Learning based on PyTorch.
http://avalanche.continualai.org
MIT License
1.71k stars 280 forks source link

Operates on each experience in train_stream #1618

Closed Amos58 closed 3 months ago

Amos58 commented 3 months ago

Discussed in https://github.com/ContinualAI/avalanche/discussions/1617

Originally posted by **Amos58** March 13, 2024 I need to operate on each experience in train_stream, and I am trying to use addition and marix multiplication first. Here is my codes: ![image](https://github.com/ContinualAI/avalanche/assets/55913276/25ea83c8-aa56-44e9-a7e3-4cfd93bc63b4) However, it reports an error that "TypeError: unsupported operand type(s) for +: 'NCExperience' and 'NCExperience'". Then I check API documents, there is not any information about how to operate on experience. I wonder if I can check the values of each experience in train stream or test stream, and perform math on it. Here is the shotcut of API documents of NCExperience class: ![image](https://github.com/ContinualAI/avalanche/assets/55913276/0383e42a-5548-4e6a-9ac6-c7374a77072c)