Closed geajack closed 2 years ago
Thanks for reporting this bug !
Would you like to fix it? If you look at the unit tests, you'll probably find a good example of how it's used :wink:
Hi geajack. The problem is in the following line:
targets = torch.LongTensor([10, 400, 5]).random_(0, spk_cnt)
A list of three elements is passed while the function expects to have three separate arguments, like this:
targets = torch.LongTensor(10, 400, 5).random_(0, spk_cnt)
I'll be submitting a PR for this issue, if you don't mind :)
📚 Documentation
The example code for the affinity loss on this page seems to be broken:
This results in
PyTorch version: 1.10.2 Asteroid version: 0.5.2