Skip to content

Add GRUCell support

Choose a tag to compare

@AkashPrajapathi AkashPrajapathi released this 25 Oct 15:33
· 11 commits to main since this release

AndroidDL v1.1.0

🚀 New Features

  • Added GRUCell for recurrent neural network architectures.
  • Supports configurable input size and hidden size.
  • Supports optional biases, enabled by default.
  • Implements update, reset, and candidate hidden-state gates.
  • Integrates with AndroidDL's existing Module, Linear, and autograd system.

🧪 Testing

  • Verified forward-pass output shapes and finite values.
  • Verified gradients across all GRU parameter groups.
  • Tested numerical gradients using finite differences.
  • Trained on a small sequence-to-target task and observed a significant reduction in loss.

Example

import { GRUCell } from "androiddl";

const gru = new GRUCell(3, 4);

const nextHidden = gru.call(input, hidden);

input has shape [batchSize, inputSize], and hidden has shape [batchSize, hiddenSize].

Notes

This release introduces a GRU building block for sequence models and reinforcement-learning experiments.