Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom PyTorch C++ Kernel

To compile, run

pip install -r requirements.txt
python setup.py build

This will also install the module torch_kernel in the Python system path.

To run the unit tests, run

pytest

To import the module, import first torch

import torch
import torch_kernel

To train a sample regressor neural network (one LSTM-like layer followed by a linear layer) run:

python applications/custom_nn.py

This script contains PyTorch classes wrapping up the custom layer. It also shows how to run stochastic gradient descent to update the network weights, and solve a sample Scikit-learn regression problem.

About

C++ kernel for PyTorch using pybind11

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages