# How to build a sparse net using Pytorch

**URL:** <https://discuss.pytorch.org/t/how-to-build-a-sparse-net-using-pytorch/173276>\
**Category:** Uncategorized\
**Created:** [February 22, 2023, 11:35pm UTC](https://discuss.pytorch.org/t/how-to-build-a-sparse-net-using-pytorch/173276 "2023-02-22T23:35:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nahidalam](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/nahidalam/32/50427_2.png) [@nahidalam](https://discuss.pytorch.org/u/nahidalam)\
**Post date:** [February 22, 2023, 11:35pm UTC](https://discuss.pytorch.org/t/how-to-build-a-sparse-net-using-pytorch/173276/1 "2023-02-22T23:35:31Z")

</div>

Trying to understand how to use Pytorch to build a sparse neural net. Lets say I have the code of a Vision Transformer. I now want to create a sparsed version of this ViT. How do I get started? I see pytorch has a `torch.sparse` in beta [torch.sparse — PyTorch 1.13 documentation](https://pytorch.org/docs/stable/sparse.html)
