It seems you are working on a multi-label classification with 40 labels (based on the number of loss functions you are creating).
Inside the model you are reusing the same nn.Sequential block (self.fc) for all tasks. Is this intended or would you like to initialize own layers for each task?