Open connectdotz opened 6 years ago
Seems to be the dot product that is failing. Try replacing K.dot calls with the following in AttLayer.call:
def dot_product(x, kernel): if len(kernel.shape)==2: return K.squeeze(K.expand_dims(K.dot(x, kernel)), axis=-1) else: return K.squeeze(K.dot(x, K.expand_dims(kernel)), axis=-1)
First, thanks for this wonderful repo, I am trying to adopt your
hatt-archive-cntk.ipynb
to tensorflow backend, it is giving the following error when constructing the model, wondering if you have any insight: