Skip to main content

A NumPy-based neural network library featuring RNN, GRU cells, CTC loss/decoding, greedy and beam search decoders — built from scratch without PyTorch.

Project description

custom-rnn

A lightweight, NumPy-only neural network library implementing recurrent architectures and CTC (Connectionist Temporal Classification) from scratch.

Features

  • RNN Cell — vanilla recurrent neural network cell with forward and backward (BPTT) support
  • GRU Cell — gated recurrent unit with reset, update, and new gates
  • RNN Phoneme Classifier — multi-layer RNN for sequence classification
  • Character Predictor — GRU-based character-level prediction with inference utilities
  • CTC Loss — full CTC forward-backward algorithm with posterior probability computation
  • CTC Decoding — greedy search and beam search decoders
  • Neural Network Primitives — Linear layer, Sigmoid, Tanh, Softmax Cross-Entropy loss

Installation

pip install custom-rnn

Quick Start

import numpy as np
from mytorch import RNNCell, GRUCell
from CTC import CTC, CTCLoss, GreedySearchDecoder, BeamSearchDecoder

# Create an RNN cell
rnn = RNNCell(input_size=10, hidden_size=20)
x = np.random.randn(1, 10)
h = np.zeros((1, 20))
h_next = rnn(x, h)

# Create a GRU cell
gru = GRUCell(input_size=10, hidden_size=20)
x = np.random.randn(10)
h = np.zeros(20)
h_next = gru(x, h)

# CTC greedy decoding
symbols = ["a", "b", "c"]
decoder = GreedySearchDecoder(symbols)

# CTC beam search decoding
beam_decoder = BeamSearchDecoder(symbols, beam_width=3)

Requirements

  • Python >= 3.8
  • NumPy

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

custom_rnn-0.1.0-cp313-cp313-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.13Windows x86-64

custom_rnn-0.1.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

custom_rnn-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

custom_rnn-0.1.0-cp312-cp312-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.12Windows x86-64

custom_rnn-0.1.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

custom_rnn-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

custom_rnn-0.1.0-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

custom_rnn-0.1.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

custom_rnn-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

custom_rnn-0.1.0-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

custom_rnn-0.1.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

custom_rnn-0.1.0-cp310-cp310-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

custom_rnn-0.1.0-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

custom_rnn-0.1.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

custom_rnn-0.1.0-cp39-cp39-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file custom_rnn-0.1.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: custom_rnn-0.1.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for custom_rnn-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a5b66f310b6249adc276a10abb7c43fc1c25570c47afd9790bb6922da486506c
MD5 310f51301ca5fd44c96b6ccbc6a9459d
BLAKE2b-256 2bc52b4d01a843edfe8dfb1655c384915bda4e086ac9bba56e8bf6a813fbca88

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 02b3e4444aa1f54ebc3c1b985c7cd67d16ac809f13f68b162461e25de8b9f028
MD5 d0fb7236c1a9b1e84735423eb98a8eb1
BLAKE2b-256 199692dd01650c09318c5d9f27c81e939157d039abd5a1ebc40fdcca90f976ab

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 26302d8c7ae72d9af35fd9cc5ec4c586e897920e2ea64b6f17d9714e2a99be0c
MD5 8ecd8e683fcfb6ae174454669d50e372
BLAKE2b-256 b0499f02141950520b3806374094cb55e2cf21ce67b65ddda82919ba55783732

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: custom_rnn-0.1.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for custom_rnn-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fa20b60b16d82a298a270b924effaefdea7436457e94db361bd00fcfd511a91a
MD5 4bd751e178dff34101a10d38e5552fba
BLAKE2b-256 08561cec75c56203c38e64e87af6d4dcfa7fad00c2f4cc5b6bb67016a15ccc9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9d57d6e1d4b9f42f3fc086e0c88b42c9882e60ff11e0b2f035b2a94eca88bb79
MD5 986c34a2afe38fa5d12adcc0ed4f4985
BLAKE2b-256 054efb992fd6f0ea707978cecccbda65237e5a9fc944d3bc0ef2b75acac05ab8

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 46f1606e6ea069f3cf42dec6a090c1630d0d3219da74f31855ed6945b88aacc5
MD5 8377180d46cc5fec57cc5894ca622b33
BLAKE2b-256 4c21937d827a164cd5fe4388f7d2387876dd0ecbfd2237690951f6b1db700744

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: custom_rnn-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for custom_rnn-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 42f7b1b7948eb0dd9509ee8500e6007d8d1edd0a1da20ca03992bd61abcd607e
MD5 f8dd522797d8246d2d1892c4b89ebd5c
BLAKE2b-256 0874afa272f8a943be20ae677c186d78b859d9b9bacbe71f929ce99d77b6a7b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 9aeb72298485d039021288189d08edb3b2b0d52028252b767568eb285d9dac38
MD5 ebfe4f6c593299112f4bccec6c0e68a1
BLAKE2b-256 40a004e100e3af28c99ac05c563cd11536fa6cfaaed3fc50091d3f03f0c5c0ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c8f8e56a7c93e1d55d51d8c33e0d52b9b5994a62562fa53fd835d36570873e01
MD5 26b4ff1bece0566392f7faf591588226
BLAKE2b-256 c5cca20474e45fb45cbc37f9ebc1160a429165300244db886981934a8528290d

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: custom_rnn-0.1.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for custom_rnn-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a008a9a3abc4dcfcd723f997e6a77c186dd97e683e978fa2096a077a0579e569
MD5 7fa1f00535a760e5dfd06d8cd27aa3e3
BLAKE2b-256 058a234fb16b7ce9e5503e5a87a5b8bfe937513e429befafe291c88e91e0757e

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 890b506b76241e9ad0c3d40fe3fa00d4aec568354e3422d86e08b814411867a3
MD5 55d30e277b0f96a27cc472ac675b5fd9
BLAKE2b-256 c10addfeb561a2df7a7b44761117cba955859e5076bcddaf65e27dea35c1c708

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 707865d960be8feca84fbd9c3a81b8c418f3bf10a6e965fcade8350eda471987
MD5 19cc01a1ac080d121690887d181b86e8
BLAKE2b-256 ce69ffea0a5b85f9c2d376dd05aaefc5771f518d3e2d4d56be600a81eced1c54

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: custom_rnn-0.1.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for custom_rnn-0.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 20f05c57f45c01aa009710f36a13fc33307b126ecceaf66902c88600326176f1
MD5 a0531431d91b4d1fc6764ad988c4f407
BLAKE2b-256 78fd7b79434a468a63d780a0b5fff5044e3ea4013aca97fb27e040bc578ac9fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp39-cp39-win_amd64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 0ad50646d6a73296cf36cf3e295fbc8a62d1fdf8651ddfcf5c03cc32021aa9ad
MD5 618f59eb4bd8e50d7c0cb94837ea9660
BLAKE2b-256 6190f40a4ed4469da58bc143f0c4e64b7cb5fa223aea01e209d75c127a121925

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file custom_rnn-0.1.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for custom_rnn-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4f92d38e12d06b92d9935cd4df62749319edfa448989ab600f54a59c94c5352
MD5 6f7a9a957f3de7a6a5b8a08be64b581e
BLAKE2b-256 902f5f7cbd211b3edaf4d595fdf10d26a982ea030fb0a004c5c28017104999b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for custom_rnn-0.1.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: publish.yml on kkipngenokoech/RNN

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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