This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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): |