Skip to content

Instantly share code, notes, and snippets.

Avatar
🤩

Pariente Manuel mpariente

🤩
View GitHub Profile
@mpariente
mpariente / bidirectional_LSTM.py
Last active Dec 19, 2017
Creating a child of Bidirectional to handle return_states
View bidirectional_LSTM.py
# In answer to this issue
# https://github.com/keras-team/keras/issues/8823
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:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
You can’t perform that action at this time.