import numpy as np
Imports
Hidden State Activation
Hidden State & Inputs
w_hh = np.full((3,2), 1); w_hh
w_hx = np.full((3,3), 9); w_hx
h_t_prev = np.full((2,1), 1); h_t_prev
x_t = np.full((3,1), 9); x_t
stack_1 = np.hstack((w_hh, w_hx)); stack_1
stack_2 = np.vstack((h_t_prev, x_t)); stack_2
formula_1 = stack_1@stack_2; formula_1
formula_2 = w_hh@h_t_prev+ w_hx@x_t; formula_2
array([[245],
[245],
[245]])