Thanks for the suggestion. But the use of Sequential would probably make all the individual feed-forward neural network sequential. So, for example, if I have 3 tasks, I need 3 individual FFNN which will be used for the respective task. Currently, I am using the self.ffnn for n tasks as self.ffnn[i] stands for ith task’s FFNN. So, I think I can’t use Sequential in this purpose.