Skip to main content

NeuroScribe - a lightweight deep learning framework.

Project description

NeuroScribe v0.2.0

Installation

> pip install neuro-scribe

[!Note]

  • If you want CUDA support for GPU acceleration, please ensure that you have CUDA Toolkit version 12 or higher installed on your device.
    You can download CUDA Toolkit from the official NVIDIA website: CUDA Toolkit Downloads
  • If you're installing NeuroScribe on an Apple Silicon Mac, NeuroScribe will automatically detect the architecture and install additional dependencies for Metal Performance Shaders (MPS) support.

Quick Start Example

This example demonstrates how to use Neuroscribe in a way that closely resembles PyTorch syntax and conventions. By following PyTorch's familiar patterns, users can easily integrate Neuroscribe into their existing deep learning workflows without significant adjustments.

import neuroscribe as ns
import neuroscribe.nn as nn


class MyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.l1 = nn.Linear(784, 128)
        self.relu = nn.ReLU()
        self.l2 = nn.Linear(128, 10)

    def forward(self, x):
        x = self.l1(x)
        x = self.relu(x)
        x = self.l2(x)
        return x


def main():
    model = MyModel()
    model.eval()
    model.to('cuda')
    input = ns.randn(32, 784, dtype='float32', requires_grad=False, device='cuda')
    output = model(input)
    print(output)


if __name__ == '__main__':
    main()

Available Accelerators

Neuroscribe currently supports the following accelerators:

  • CPU (default)
  • CUDA
  • MPS (Metal Performance Shaders)

We plan to add support for additional accelerators to further enhance performance capabilities.

Notes

  • Functions suffixed with '_' in the Tensor class perform in-place modifications to the Tensor object and do not create a new Tensor as output.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neuro-scribe-0.2.0.post3.tar.gz (30.7 kB view details)

Uploaded Source

File details

Details for the file neuro-scribe-0.2.0.post3.tar.gz.

File metadata

  • Download URL: neuro-scribe-0.2.0.post3.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for neuro-scribe-0.2.0.post3.tar.gz
Algorithm Hash digest
SHA256 e9ed448ff8a999ad7dadfd1c340eccb40b2e069bb25c44cee6dc7ac797f0024c
MD5 0da6a317726745c3772d24911442488f
BLAKE2b-256 e0caf09a466dc1561ccd63d3bd9c2a4a94dc402de92d4f32e7cd4959ebcc906b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page