Hi Piotr,
Thank you for your reply.
That’s true, I am working on a multitask case that has
[batch_size, nb_classes=26]
my model output is :
output shape torch.Size([8, 26])
I defined my classes range as:

p.random.seed(self.seed)
self.task_ids = [[0,1], [2,3], [4,5], [6,7], [8,9], [10,11], [12,13], [14,15], [16,17], [18,19], [20,21], [22,23], [24,25]]
self.train_set = {}
self.test_set = {}

This is my target model:
targets[index] 1  till targets[index] 26
how to proceed and check my model output shape if it is right or wrong,
I am still not sure why once I increase the number of tasks (not learning rate) it is failing, it might be just having a chance randomly to select more targets while on ntasks = 1 it is using fewer targets in an index less than 17 ?