How to reverse a multi-hot encoding ?
multihot_batch = torch.tensor([[0,1,0,1], [0,0,0,1], [0,0,1,1]])
(multihot_batch == torch.tensor(1)).nonzero()
tensor([[0
How to reverse a multi-hot encoding ?
multihot_batch = torch.tensor([[0,1,0,1], [0,0,0,1], [0,0,1,1]])
(multihot_batch == torch.tensor(1)).nonzero()
tensor([[0