Thanks for your response. I used torch.manual_seed()to set random seeds to a constant number, it really works and the training losses are converged to two close values.
But I find a weird thing. Although I didn’t set the random seeds when I converted the combined nn.Sequential() like Net2 to a class based on nn.module(), the training losses of these two operations have a similar trend and converge to close values but are different from using two sequential nn.Sequential() like Net1. I don’t understand why.