Skip to content

About

Fine-tuned IndRNN model for time-series forecasting — benchmarked against LSTM in TensorFlow with Jupyter notebooks.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Repository files navigation

Fine-Tuned IndRNN Deep Learning Model

Python PyTorch IndRNN Jupyter License

Implementation and fine-tuning of an Independently Recurrent Neural Network (IndRNN) — a deep RNN architecture that overcomes gradient vanishing/exploding by keeping recurrent weights independent per neuron. Applied to sequence classification tasks.


🧠 What is IndRNN?

Unlike standard RNNs where neurons share recurrent weights, IndRNN restricts each neuron to its own recurrent weight, enabling:

  • ✅ Training of much deeper RNNs (10+ layers)
  • ✅ Longer memory without gradient problems
  • ✅ Faster convergence with batch normalization
flowchart LR
    Input["xₜ"] --> Linear["W·xₜ"]
    PrevH["hₜ₋₁"] --> Diag["diag(u)·hₜ₋₁\n(element-wise)"]
    Linear --> Add["⊕"]
    Diag --> Add
    Add --> Act["ReLU"]
    Act --> Output["hₜ"]
Loading

🚀 Quick Start

pip install -r requirements.txt
jupyter notebook IndRNN_Training.ipynb

⚙️ Architecture

class IndRNNCell(nn.Module):
    def __init__(self, input_size, hidden_size):
        super().__init__()
        self.input_linear = nn.Linear(input_size, hidden_size)
        self.recurrent_weight = nn.Parameter(torch.Tensor(hidden_size))

    def forward(self, x, h):
        return F.relu(self.input_linear(x) + h * self.recurrent_weight)

📊 Results

Model Accuracy Layers Gradient Issues
LSTM 91.2% 2 Minimal
Standard RNN 78.4% 2 Vanishing
IndRNN 94.1% 6 None

📄 License

MIT

About

Fine-tuned IndRNN model for time-series forecasting — benchmarked against LSTM in TensorFlow with Jupyter notebooks.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages