🔁

Bidirectional GRU (biGRU)

Bidirectional GRU (biGRU) is a type of recurrent neural network that processes data in both forward and backward directions, capturing context from both past and future time steps. It is especially useful for time series forecasting and sequence modeling tasks where context from both directions improves performance.

Key Features

Architecture

biGRU: Forward & Backward Illustrative Architecture (SVG)

Python Example (Keras)

from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Bidirectional, GRU, Dense

model = Sequential([
    Bidirectional(GRU(64, return_sequences=True), input_shape=(timesteps, features)),
    Bidirectional(GRU(32)),
    Dense(1)
])
model.compile(optimizer='adam', loss='mse')
model.summary()

Use Cases

References