In order to shortcut plenty of misunderstandings, could you add a single line to the code and show us the output…
def forward(self, x):
      y = self.NN1(x)
      print(x.size(), y.size()) # <- this line
      if y>0:
         return self.NN2(x)
     else:
         return self.NN3(x)