Closed FakerYFX closed 5 years ago
I am sorry for my negligence. We have to change source code of sparse_categorical_crossentropy
in backend/tensorflow_backend.py
: repalce logits = tf.reshape(output, [-1, int(output_shape[-1])])
with logits = tf.reshape(output, [-1, tf.shape(output)[-1]])
.
Also see https://github.com/keras-team/keras/commit/613aeff37a721450d94906df1a3f3cc51e2299d4
Thanks for your reply, it solved the error I meet !
so how to make the test? just remove the comment:# test(test_data, test_tables)? @bojone
yes @xieyufei1993
@xieyufei1993 您好,请问您那有没有nl2sql的数据集?
when i run nl2sql_baseline.py , i meet this error: Traceback (most recent call last): File 'nl2sql_baseline.py', line 254, in
pcsel_loss = K.sparse_categorical_crossentropy(csel_in, pcsel)
File '/home/work/.local/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py', line 3345, in sparse_categorical_crossentropy
logits = tf.reshape(output, [-1, int(output_shape[-1])])
TypeError: int returned non-int (type NoneType)
so i want to know the version of tenfsorfow and keras and python? @bojone