Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/masadcv/pytorchsparsemodules

Collection of learnable sparse modules for pytorch models
https://github.com/masadcv/pytorchsparsemodules

Last synced: 1 day ago
JSON representation

Collection of learnable sparse modules for pytorch models

Awesome Lists containing this project

README

        

# Simple Sparse Convolutions
[![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

This repository implements simplest forms of sparse convolutions in PyTorch.

Within the repository, implementation is provided for the following:

## Installation
This package can be installed as:

`pip install torchsparsemodules`

or

`pip install git+https://github.com/masadcv/PyTorchSparseModules`

## Examples
Usage examples are provided in example python files within the repository.

A simple example (`example.py`) usage following a PyTorch usage format:

```
import torchsparsemodules
import torch

sparseconv3d = torchsimplesparseconv.Conv3d(kernel_size=(9, 9, 9), stride=1)
output_sparse_conv3d = sparseconv3d(torch.rand(size=(1, 1, 128, 128, 128)))

print(output_sparse_conv3d.shape)

sparseconv3d = torchsimplesparseconv.Conv2d(kernel_size=(9, 9), stride=1)
output_sparse_conv2d = sparseconv3d(torch.rand(size=(1, 1, 128, 128)))
print(output_sparse_conv2d.shape)
```

## Citation
If you use our code, please consider citing our paper:

```
```