PyTorchStepByStep icon indicating copy to clipboard operation
PyTorchStepByStep copied to clipboard

A code mistake in the book

Open Neuerliu opened this issue 1 year ago • 2 comments

There is a mistake on page 113 of the book.

# on page 113
predictions = torch.tensor(0.5, 1.0)
labels = torch.tensor(2.0, 1.3)

Probably what you really want to write is

predictions = torch.tensor([0.5, 1.0])
labels = torch.tensor([2.0, 1.3])

Thank you Neuer

Neuerliu avatar Mar 04 '23 07:03 Neuerliu