Skip to main content

NeuroScribe - a lightweight deep learning framework.

Project description

NeuroScribe v0.1.0

NeuroScribe a lightweight deep learning framework.

Installation

pip install neuro-scribe

Notes:

  • 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.1.0.post1.tar.gz (9.0 kB view details)

Uploaded Source

File details

Details for the file neuro-scribe-0.1.0.post1.tar.gz.

File metadata

  • Download URL: neuro-scribe-0.1.0.post1.tar.gz
  • Upload date:
  • Size: 9.0 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.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 fca754f84c408d4229960d13d1b99ba9630b8d141b1b93d1e8ef3d4b7295618a
MD5 13ab96b23c701be68559996dc8e62afd
BLAKE2b-256 3eecdd61c78654ea5d96c3fb2483d90b895075ddbd4b37c668eb59b4f75e5b7c

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