Attention_Network_With_Keras icon indicating copy to clipboard operation
Attention_Network_With_Keras copied to clipboard

Duplicate node name in graph

Open wandli opened this issue 5 years ago • 2 comments

Hi, Thank you for your example. I'm trying to use this Attention example in my LSTM model. However, in def attention layer, the line h = Lambda(lambda X: K.zeros(shape=(K.shape(X)[0], n_h)))(X) caused an error ValueError: Duplicate node name in graph: 'lambda_16/zeros/packed' Do you know how to solve it? Thanks!

wandli avatar Nov 27 '19 11:11 wandli

Sorry for not responding earlier - have you resolved this issue? I personally have not used TF in over a year (having switched to PyTorch), though I vaguely recall this being an issue with re-running network setup without restating the jupyter notebook.

If you're still interested in resolving this and have a set of steps to reproduce this, I can probably solve this much quicker.

Choco31415 avatar Mar 17 '20 20:03 Choco31415

Hello ,I also meet this problem, searching a lot but failed to solve it, sincerely to get your help.

DW-Lay avatar May 05 '20 15:05 DW-Lay