keras-attention
keras-attention copied to clipboard
Visualizing RNNs using the attention mechanism
cannot import name 'Recurrent' from 'keras.layers.recurrent'
I want to add a custom attention layer to my model but when I run the code in https://github.com/datalogue/keras-attention/issues/15 (mzbac commented on Feb 8, 2018), I received the following error...
Dears, please note that the recurrent layer is no longer supported by keras and obtaining its source code to run it independently is not feasible as the source code, too,...
I am trying to the pass the decoder output to another layer of rnn. However it gives me the error. **#TypeError: float() argument must be a string or a number,...
Hi, I have two networks that I want to concatenate. So, here is the piece of code ~~~ ... a = Bidirectional(LSTM(256, return_sequences=True))(input_a) a = AttentionDecoder(128, 128)(a) ... b =...
I ran into the following issue when using the custom s2s attention layer. (Keras 2.1.3 and python3.6.1). Anyone can help? File "/apps/keras/2.1.3-py36/lib/python3.6/site-packages/keras/legacy/layers.py", line 968, in __call__ return super(Recurrent, self).__call__(inputs, **kwargs)...
I am trying to implement this model for time series data. I want to use past 5 days data (time_step=5) and predict the next day(y=1) How can I prepare the...
model = Sequential() model.add(Embedding(vocab_size, VOCAB_REP_DIM, input_length=WINDOW_SIZE, weights=[embedding_matrix])) model.add(Bidirectional(LSTM(HIDDEN_DIM, return_sequences=True))) model.add(AttentionDecoder(HIDDEN_DIM, vocab_size)) model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['acc']) model.summary() I would like to use pre-trained word2vec embedding. vocab_size = 149 VOCAB_REP_DIM = 100 WINDOW_SIZE...
I do want to know the mode of this attention
Traceback (most recent call last): File "C:\Users\Bruce Rogers\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 455, in _apply_op_helper as_ref=input_arg.is_ref) File "C:\Users\Bruce Rogers\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1211, in internal_convert_n_to_tensor ctx=ctx)) File "C:\Users\Bruce Rogers\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1146, in internal_convert_to_tensor ret =...