Closed bockets closed 10 months ago
Hi @bockets, thanks for another report, but I'm not able to reproduce the warning. That line and the next one will give target
a shape of [1, 10]
.
target = Torch.randn(10) # a dummy target, for example
target = target.view(1, -1) # make it the same shape as output
https://github.com/ankane/torch.rb/blob/b0fa9a17671e0b04e8529ea439601c831e087e3a/tutorials/blitz/neural_networks.md?plain=1#L143
I think this line is supposed to be
target = Torch.randn(1, 10)
rather thantarget = Torch.randn(10)
to fit in with the sample code that precedes this line.Otherwise I get the warning: