-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
failed at gather_nd_op.cc indices[15,23] = [15, -1] does not index into param shape [16,24] #2
Comments
我意识到是由于我的cuda版本过新,无法在tensorflow1.x中使用gpu,在使用cpu下的等效处理后解决了这一问题,但在训练了2个epoch后出现了损失为nan的情况loss: nan | ext_loss: nan | con_loss: nan | acc: 0.463 | time: 2.289,我没有改动超参数 |
能否提供您在event数据集上训练好的模型参数,感谢! |
我解决了以上的大部分问题,但我发现在3090上训练了接近30k steps后仍然无法达到预期的结果,我猜测这可能与我的vocab.txt有关,因为结果中出现了很多UNK,我试过很多方式构造vocab,基于所有的event数据集上的json文件的输入输出字段构建,但效果不佳,请问您在中文数据集event和celebrity上的vocab.txt文件是如何构建的,基于字or基于单词?词表大小如何?我在基于单词构造的50k大小的词表中得到了最好的结果,但仍然不足以消除全部的UNK,您是否在中文数据集上使用了更大的词表??感谢! |
你好,请问输入是否有经过分词?可以检查一下输入单词是否成功映射成ID?训练loss是否有下降?词表大小50k应该足够了。 |
您好,我采用的是您提供的event和celebrity数据集,它们看起来似乎已经经过了分词?并且我使用您提供的data_process/make_dict.py 在训练集上构建vocab.txt文件(我不确定您在make_dict.py中使用的
这两行是否有不同的用途,但我在使用注释掉的一行构建vocab时得到的是分词后的单词词表,超过50k大小,而非注释时则是独立汉字,不足50k),训练时loss下降得非常缓慢。 |
你好,这两个代码是针对不同语言和输入格式使用的。不要用独立汉字作为词表,而是使用分词的词组作为词表,选择频率最高的50k单词即可。 |
当我运行run_summarization.py时,报错
2024-01-16 19:37:43.610554: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at gather_nd_op.cc:47 : Invalid argument: indices[15,23] = [15, -1] does not index into param shape [16,24] 2024-01-16 19:37:43.610554: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at gather_nd_op.cc:47 : Invalid argument: indices[15,23] = [15, -1] does not index into param shape [16,24] 2024-01-16 19:37:43.610554: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at gather_nd_op.cc:47 : Invalid argument: indices[15,23] = [15, -1] does not index into param shape [16,24] 2024-01-16 19:37:43.610554: W tensorflow/core/framework/op_kernel.cc:1651] OP_REQUIRES failed at gather_nd_op.cc:47 : Invalid argument: indices[15,23] = [15, -1] does not index into param shape [16,24] Traceback (most recent call last): File "/home/xss/miniconda3/envs/tf/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1365, in _do_call return fn(*args) File "/home/xss/miniconda3/envs/tf/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1350, in _run_fn target_list, run_metadata) File "/home/xss/miniconda3/envs/tf/lib/python3.6/site-packages/tensorflow_core/python/client/session.py", line 1443, in _call_tf_sessionrun run_metadata) tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[15,23] = [15, -1] does not index into param shape [16,24]
我按照readme文件所述的先执行了data_process.py,通过运行make_dict得到了vocab.txt,为什么会出现上述错误,麻烦您有空指点一下The text was updated successfully, but these errors were encountered: