Skip to content

Instantly share code, notes, and snippets.

View chammika's full-sized avatar

Chammika Mannakkara chammika

View GitHub Profile
@chammika
chammika / SimpleRNN_test.py
Last active August 17, 2018 16:15
Simple RNN testing stateful mode for forward propagation
from keras.models import Model
from keras.layers import Input
from keras.layers import LSTM, Dense, SimpleRNN
from numpy import array
import numpy as np
import keras
def SimpleRNN_forward(weights, inputs, return_sequence=False):
kernel = np.array(weights[0]) # kernel weights