Skip to main content

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

Project description

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.

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

deepraaga_models-0.1.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepraaga_models-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file deepraaga_models-0.1.0.tar.gz.

File metadata

  • Download URL: deepraaga_models-0.1.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for deepraaga_models-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5c30b4b44ae44e0d4b53f5aad2d5ba9f45f27fce705eb56ad725b5d0c7514b81
MD5 7bd03a8c294fad0fba03f6d4a9c5888e
BLAKE2b-256 cf68f457ce4ca29f7bc32552d754871865402457494f760a2dbe3e5ee0a5e3af

See more details on using hashes here.

File details

Details for the file deepraaga_models-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deepraaga_models-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed4330d9f89a55b7aa47ec6992a88ca3ccf03db3391369c074b0487effb8801a
MD5 8d3526d43324e24877764dae1747b552
BLAKE2b-256 643a661d6d00d56cb57a094770bd0cdaeda16b968ef8e22d29d296af33037fe0

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