Choco31415 / Attention_Network_With_Keras

An example attention network with simple dataset.
230 stars 101 forks source link

Duplicate node name in graph #4

Open wandli opened 4 years ago

wandli commented 4 years ago

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!

Choco31415 commented 4 years ago

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.

DW-Lay commented 4 years ago

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