Pytorch If Else In Forward