You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 = Bidirectional(LSTM(256, return_sequences=True))(input_b)
b = AttentionDecoder(128, 128)(b)
...
c = concatenate([a, b])
d = Model([input_a, input_b], c)
This raise ValueError: The name "AttentionDecoder" is used 2 times in the model. All layer names should be unique.
Any idea how to deal with this problem? I already comment name=AttentionDecoder inside the class/funcion.
The text was updated successfully, but these errors were encountered:
bagustris
changed the title
Concatenate two AttentionDecoder raise ValueError: The name "AttentionDecoder" is used 2 times in the model. All layer names should be unique.
Concatenate two AttentionDecoders raise ValueError
Jun 5, 2019
It's late but I hope it can help someone else: uncomment name='AttentionDecoder' inside the class, and then do the following while using AttentionDecoder class:
...
a = Bidirectional(LSTM(256, return_sequences=True))(input_a)
a = AttentionDecoder(128, 128, name='AttentionDecoder1')(a)
...
b = Bidirectional(LSTM(256, return_sequences=True))(input_b)
b = AttentionDecoder(128, 128, name='AttentionDecoder2')(b)
...
c = concatenate([a, b])
d = Model([input_a, input_b], c)
Hi,
I have two networks that I want to concatenate. So, here is the piece of code
This raise
ValueError: The name "AttentionDecoder" is used 2 times in the model. All layer names should be unique.
Any idea how to deal with this problem? I already comment
name=AttentionDecoder
inside the class/funcion.The text was updated successfully, but these errors were encountered: