Skip to main content

Crate rstorch_python

Crate rstorch_python 

Source
Expand description

Python bindings for ToRSh - PyTorch-compatible deep learning in Rust

This crate provides Python bindings for the ToRSh deep learning framework, enabling PyTorch-compatible APIs to be used from Python.

§Modular Structure

The crate is organized into focused modules:

  • tensor - Tensor operations and creation functions
  • nn - Neural network layers and containers
  • optim - Optimization algorithms
  • device - Device management and utilities
  • dtype - Data type definitions and conversions
  • error - Error handling and conversions
  • utils - Common utilities and helpers

Re-exports§

pub use device::PyDevice;
pub use dtype::PyDType;
pub use error::TorshPyError;
pub use tensor::PyTensor;

Modules§

autograd
Autograd module bindings with enhanced gradient computation support
data
Python bindings for torsh-data — Dataset and DataLoader APIs
device
Device handling for Python bindings
distributed
Distributed training bindings
dtype
Data type handling for Python bindings
error
Error handling for PyTorch Python bindings
nn
Neural Network module - PyTorch-compatible neural network layers and containers
optim
Optimization algorithms module - PyTorch-compatible optimizers
tensor
Tensor module - PyTorch-compatible tensor operations in Python bindings
utils
Utility functions and helpers for the torsh-python crate

Macros§

py_result
Macro for easy error conversion