Initialise empty sparse tensor

Try

import torch

x = torch.empty([1, 5, 30, 20], layout=torch.sparse_coo)
1 Like