create pytorch zeros

Solutions on MaxInterview for create pytorch zeros by the best coders in the world

showing results for - "create pytorch zeros"
Edoardo
19 Jan 2017
1>>> torch.zeros(2, 3)
2tensor([[ 0.,  0.,  0.],
3        [ 0.,  0.,  0.]])
4
5>>> torch.zeros(5)
6tensor([ 0.,  0.,  0.,  0.,  0.])
7