请您帮助下,对话情感分析的报错,预训练文件和数据以及文件都没错,按照操作步骤来的
Created by: Igoslow
对话情感分析时,使用sh run.sh所有命令都能运行,但是sh run_ernie.sh train的时候会出现报错,数据和预训练文件都来自github。报错内容为: Error: The feeded Variable 1 should have dimensions = 3, shape = [-1, 64, 1], but received feeded shape [32, 23, 1] [Hint: Expected DimensionIsCompatibleWith(shapes[i], in_dims) == true, but received DimensionIsCompatibleWith(shapes[i], in_dims):0 != true:1.] at (/paddle/paddle/fluid/operators/reader/read_op.cc:133) [operator < read > error]
更详细的报错如下: Device count: 16 Num train examples: 9655 Max train steps: 57 Theoretical memory usage in training: 7954.669 - 8333.463 MB Load model from ./pretrain_models/ernie/params /root/env/emotion/lib/python3.7/site-packages/paddle/fluid/executor.py:782: UserWarning: The following exception is not an EOF exception. "The following exception is not an EOF exception.") Traceback (most recent call last): File "run_ernie_classifier.py", line 403, in main(args) File "run_ernie_classifier.py", line 327, in main outputs = train_exe.run(program=train_program, fetch_list=fetch_list, return_numpy=False) File "/root/env/emotion/lib/python3.7/site-packages/paddle/fluid/executor.py", line 783, in run six.reraise(*sys.exc_info()) File "/root/env/emotion/lib/python3.7/site-packages/six.py", line 703, in reraise raise value File "/root/env/emotion/lib/python3.7/site-packages/paddle/fluid/executor.py", line 778, in run use_program_cache=use_program_cache) File "/root/env/emotion/lib/python3.7/site-packages/paddle/fluid/executor.py", line 831, in _run_impl use_program_cache=use_program_cache) File "/root/env/emotion/lib/python3.7/site-packages/paddle/fluid/executor.py", line 905, in _run_program fetch_var_name) paddle.fluid.core_avx.EnforceNotMet:
C++ Call Stacks (More useful to developers):
0 std::string paddle::platform::GetTraceBackString<std::string const&>(std::string const&, char const*, int) 1 paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int) 2 paddle::operators::ReadOp::RunImpl(paddle::framework::Scope const&, paddle::platform::Place const&) const 3 paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, paddle::platform::Place const&) 4 paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) 5 paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool, std::vector<std::string, std::allocatorstd::string > const&, bool, bool)
Python Call Stacks (More useful to users):
File "/root/env/emotion/lib/python3.7/site-packages/paddle/fluid/framework.py", line 2525, in append_op attrs=kwargs.get("attrs", None)) File "/root/env/emotion/lib/python3.7/site-packages/paddle/fluid/reader.py", line 733, in _init_non_iterable outputs={'Out': self._feed_list}) File "/root/env/emotion/lib/python3.7/site-packages/paddle/fluid/reader.py", line 646, in init self._init_non_iterable() File "/root/env/emotion/lib/python3.7/site-packages/paddle/fluid/reader.py", line 280, in from_generator iterable, return_list) File "../models/representation/ernie.py", line 44, in ernie_pyreader use_double_buffer=True) File "run_ernie_classifier.py", line 217, in main pyreader_name='train_reader') File "run_ernie_classifier.py", line 403, in main(args)