Skip to main content

deepraaga-models

Neural network generation backend for DeepRaaga. Extracted from the original DeepRaaga project.

Installation

pip install deepraaga-models

Overview

The deepraaga-models package holds the PyTorch implementations for Carnatic music sequence generation. It provides Recurrent Neural Network (LSTM/GRU) architectures tailored to understand and generate sequential note distributions for various Ragas.

Usage

This package provides a ready-to-use PyTorch dataset layout (RagaDataset) and model architecture (DeepRagaModel).

Model Initialization

import torch
from deepraaga_models.model import DeepRagaModel

vocab_size = 128
embedding_dim = 64
hidden_size = 256
num_layers = 2

# Initialize the model
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = DeepRagaModel(vocab_size, embedding_dim, hidden_size, num_layers).to(device)

# Provide a sequence tensor (batch_size, sequence_length)
input_seq = torch.LongTensor([[60, 62, 64, 65, 67]]).to(device)
output, hidden = model(input_seq)

Training

You can utilize the built-in training scripts for rapid experimentation:

from deepraaga_models.train import train_model

# Requires torch DataLoaders
# train_model(model, train_loader, val_loader, num_epochs=50, device=device, vocab_size=vocab_size)

License

This project is licensed under the MIT License.

Release files for deepraaga-models 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for deepraaga-models 0.1.0
File Size Uploaded
deepraaga_models-0.1.0.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deepraaga-models 0.1.0
File Interpreter ABI Platform
deepraaga_models-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / deepraaga_models-0.1.0.tar.gz

Download URL deepraaga_models-0.1.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5c30b4b44ae44e0d4b53f5aad2d5ba9f45f27fce705eb56ad725b5d0c7514b81
BLAKE2b-256 checksum
How to use checksums
cf68f457ce4ca29f7bc32552d754871865402457494f760a2dbe3e5ee0a5e3af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / deepraaga_models-0.1.0-py3-none-any.whl

Download URL deepraaga_models-0.1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed4330d9f89a55b7aa47ec6992a88ca3ccf03db3391369c074b0487effb8801a
BLAKE2b-256 checksum
How to use checksums
643a661d6d00d56cb57a094770bd0cdaeda16b968ef8e22d29d296af33037fe0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page