Answers for "adaptive_average_pool-2d"

0

adaptive_average_pool-2d

inp = torch.tensor([[[[1,2.,3], [4,5,6], [7,8,9]]]], dtype = torch.float)

print(inp .shape)
print(inp)
Posted by: Guest on May-17-2020
0

adaptive_average_pool-2d

tensor([[[[3., 4.],
          [6., 7.]]]])
Posted by: Guest on May-17-2020
0

adaptive_average_pool-2d

torch.Size([1, 1, 3, 3])
tensor([[[[1., 2., 3.],
          [4., 5., 6.],
          [7., 8., 9.]]]])
Posted by: Guest on May-17-2020
0

adaptive_average_pool-2d

out = nn.AdaptiveAvgPool2d((2,2))(inp)
print(out)
Posted by: Guest on May-17-2020

Python Answers by Framework

Browse Popular Code Answers by Language