Skip to content

Instantly share code, notes, and snippets.


Pariente Manuel mpariente

View GitHub Profile
mpariente /
Last active Dec 19, 2017
Creating a child of Bidirectional to handle return_states
# In answer to this issue
from keras import backend as K
from keras.layers import Bidirectional
from keras.utils.generic_utils import has_arg
from keras.layers import Input, LSTM
class MyBidirectional(Bidirectional):
View gist:b18b1f89e10169c4af30449f49e39521
This is a batched LSTM forward and backward pass
import numpy as np
import code
class LSTM:
def init(input_size, hidden_size, fancy_forget_bias_init = 3):