arjun-majumdar / Neural_Network_Pruning

Implementations of different neural network pruning techniques
MIT License
12 stars 0 forks source link

convert to sparse format #2

Open gongouveia opened 2 weeks ago

gongouveia commented 2 weeks ago

Tensors after prunning are of the same dimensions as before but with 0s in it to denote pruned connection. How could I cast tensors to sparse format? Any idea?

@arjun-majumdar

arjun-majumdar commented 2 weeks ago

Have you tried:

torch.Tensor.to_sparse()

Refer here