Question 2
Consider the following Pytorch code:
1. x = torch.tensor([[-3.,2.,3.],[4.,-5.,7.],[20.,3.,2.]])
2. print(torch.mean(x,dim=0,keepdim=True))
The output of the code is:
tensor([ 7., 0., 4.])
tensor([[ -7., 10., -4.]])
tensor([[ -7.],[7.],[4.]])
tensor([ -7., 7., 3.])
tensor([[7., 0., 4.]])
tensor([[ 0.],[7.],[4.]])