【错误记录】train_function->train_function
⽂本(⽅便查):InvalidArgumentError: 2 root error(s) found. (0) Invalid argument: indices[0,0] = 3479 is not in [0, 1785) [[node sequential/embedding/embedding_lookup (defined at <ipython-input-15-f68b96d3c625>:7) ]]
[[sequential/embedding/embedding_lookup/_24]] (1) Invalid argument: indices[0,0] = 3479 is not in [0, 1785) [[node sequential/embedding/embedding_lookup (defined at <ipython-input-15-f68b96d3c625>:7) ]] 0 successful operations. 0 derived errors ignored. [Op:__inference_train_function_4487] Errors may have originated from an input operation. Input Sourc
e operations connected to node sequential/embedding/embedding_lookup:
sequential/embedding/embedding_lookup/2796 (defined at /usr/lib/python3.7/contextlib.py:112) Input Source operations connected to node sequential/embedding/embedding_lookup: sequential/embedding/embedding_lookup/2796 (defined at /usr/lib/python3.7/contextlib.py:112) Function call stack: train_function -> train_function
问题翻译:InvalidArgumentError:到2个根错误。 (0)⽆效参数:indexs [0,0] = 3479不在[0,1785中] [[节点顺序/嵌⼊/嵌⼊_查(在<ipython-input-15-f68b96d3c625>:7处定义)]]] [[顺序 / embedding / embedding_lookup / _24]](1)⽆效的参数:indexs [0,0] = 3479不在[0,1785中] [[节点顺序/ embeddding / embedding_lookup(定义在<ipython-input-15-
f68b96d3c625> :7)]] 0成功操作。 忽略0个派⽣错误。 [Op:__ inference_train_function_4487]错误可能是由于输⼊操作引起的。 输⼊源操作连接到节点sequential / embeddding / embedding_lookup:顺序/ embeddding / embedding_lookup /
2796(在/usr/lib/python3.7/contextlib.py:112上定义)输⼊源操作连接到节点sequence / embeddding / embedding_lookup:顺序 / embedding / embedding_lookup / 2796(在/usr/lib/python3.7/contextlib.py:112中定义)函数调⽤堆栈:
train_function-> train_function
问题分析:
[0.1785]这个问题可以看出是词表的问题,我的chinese vocabulary size: 1784,English vocabulary size: 5232,所以词表⼤⼩要加到最⼤的那⼀个,修改代码为:english_vocab_size+1, chinese_vocab_size+3450
>function怎么记忆

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。