Solved by KFrank in post #2 
              
              
                Hi Barthelemy! 

Let me speculate that you are building a binary classification 
model – i.e., some sample either is or is not breast cancer, based 
on some kind of input features taken from a breast-tissue sample. 

(Your last layer, self.l3, has two outputs, suggesting that this 
may be binary.) 

…