module 27torch 27 has no attribute 27square 27

Solutions on MaxInterview for module 27torch 27 has no attribute 27square 27 by the best coders in the world

showing results for - "module 27torch 27 has no attribute 27square 27"
Mariana
02 Jan 2018
1>>> a = torch.randn(4)
2>>> a
3tensor([-2.0755,  1.0226,  0.0831,  0.4806])
4>>> torch.square(a)
5tensor([ 4.3077,  1.0457,  0.0069,  0.2310])
6