zygmuntz / pointer-networks-experiments

Sorting numbers with pointer networks
http://fastml.com/introduction-to-pointer-networks/
BSD 2-Clause "Simplified" License
56 stars 15 forks source link

error: #4

Closed Pooja-Palod closed 6 years ago

Pooja-Palod commented 7 years ago

File "test.py", line 82, in print "categorical accuracy: ", categorical_accuracy( YY_test, p ).eval() File "/usr/local/lib/python2.7/dist-packages/keras/metrics.py", line 10, in categorical_accuracy return K.mean(K.equal(K.argmax(y_true, axis=-1), File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 523, in argmax axis = axis % len(x.get_shape()) AttributeError: 'numpy.ndarray' object has no attribute 'get_shape'

Brucefan1994 commented 6 years ago

Why do not i have _time_distributed_dense module from keras.layers.recurrent? Please answer it if you have free time,thank you!

zygmuntz commented 6 years ago

Probably a different Keras version, try Keras 2 branch: https://github.com/zygmuntz/pointer-networks-experiments/tree/keras-2.0