Closed jl749 closed 2 years ago
(7, 7, 30) -- torch.Tensor::unsqueeze(0)
--> (1, 7, 7, 30)
(1, 7, 7) -- torch.Tensor::unsqueeze(-1)
--> (1, 7, 7, 1)
>>> x = torch.randn(2, 3, 5)
>>> x.size()
torch.Size([2, 3, 5])
>>> torch.permute(x, (2, 0, 1)).size()
torch.Size([5, 2, 3])\
batch size = 1
cell_indices = torch.arange(S).repeat(batch_size, S, 1).unsqueeze(-1) # (1, 7, 7, 1)
cell_indices.permute(0, 2, 1, 3))
What does model.eval() do in pytorch? https://stackoverflow.com/questions/60018578/what-does-model-eval-do-in-pytorch
evaluate model:
training step: