sogou / SogouMRCToolkit

This toolkit was designed for the fast and efficient development of modern machine comprehension models, including both published models and original prototypes.
Apache License 2.0
746 stars 164 forks source link

TypeError: sparse_to_dense() missing 2 required positional arguments #16

Closed bigcat2333 closed 5 years ago

bigcat2333 commented 5 years ago

在运行bidaf_squadv2.py时遇到了如下报错: File "G:\SMRCToolkit-master\sogou_mrc\data\batch_generator.py", line 121, in extract_char out = tf.sparse.to_dense(out, default_value=default_value) AttributeError: module 'tensorflow' has no attribute 'sparse'

我将文件中的tf.sparse.to_dense改为tf.sparse_to_dense,但是依旧报错 File "G:\SMRCToolkit-master\sogou_mrc\data\batch_generator.py", line 145, in transform_new_instance context_char = extract_char(context_tokens) File "G:\SMRCToolkit-master\sogou_mrc\data\batch_generator.py", line 121, in extract_char out = tf.sparse_to_dense(out, default_value=default_value) TypeError: sparse_to_dense() missing 2 required positional arguments: 'output_shape' and 'sparse_values' 请问这个问题该如何解决呢?

yxk9810 commented 5 years ago

This repo was tested on Python 3 and Tensorflow 1.12. Please check version of Tensorflow.