I fixed it! Although it didn’t have anything to do with squeeze() or unsqueeze(), I still thank you @quoniammm because I was unaware of squeeze() and unsqueeze() and they seem very useful! Turns out it was a quick fix. I had to change self.fc6 = nn.Linear(10, 1) to self.fc6 = nn.Linear(10, 2) in my Net class.