Probably unrelated to your problem, but I would recommend to remove the sigmoid and use nn.BCEWithLogitsLoss instead.
The code looks generally good, but I’, wondering, why you need these lines of code:
outputs=outputs.reshape((outputs.shape[0],1))
label=label.reshape((label.shape[0],1))

This reshape shouldn’t be necessary or what are the output and target shapes?