Error: The fed Variable text_data should have dimensions = 2, shape = [-1, 1], but received fed shape [402]
Created by: MuruganR96
I was tried training in CPU. i am facing shape mismatch error. how to resolve this issue.
i was following step by step. comments below
virtualenv --python=python2.7 env
source env/bin/activate
sudo apt-get install -y pkg-config libflac-dev libogg-dev libvorbis-dev libboost-dev swig python2.7-dev
git clone https://github.com/PaddlePaddle/DeepSpeech.git
cd DeepSpeech
pip install numpy
pip install -r requirements.txt
sh setup.sh
pip install --upgrade 'setuptools<45.0.0'
python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple
python data/librispeech/librispeech.py
python tools/compute_mean_std.py --num_samples 2000 --specgram_type linear --manifest_path manifest.train-clean-100 --output_path data/librispeech/mean_std.npz
python tools/build_vocab.py --count_threshold 0 --vocab_path data/librispeech/eng_vocab.txt --manifest_paths manifest.train-clean-100
sh ./examples/librispeech/run_train.sh
/home/dell/Projects_module/STT/env/local/lib/python2.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 "train.py", line 142, in <module>
main()
File "train.py", line 138, in main
train()
File "train.py", line 133, in train
test_off=args.test_off)
File "/home/dell/Projects_module/STT/DeepSpeech/model_utils/model.py", line 337, in train
return_numpy=False)
File "/home/dell/Projects_module/STT/env/local/lib/python2.7/site-packages/paddle/fluid/executor.py", line 783, in run
six.reraise(*sys.exc_info())
File "/home/dell/Projects_module/STT/env/local/lib/python2.7/site-packages/paddle/fluid/executor.py", line 778, in run
use_program_cache=use_program_cache)
File "/home/dell/Projects_module/STT/env/local/lib/python2.7/site-packages/paddle/fluid/executor.py", line 843, in _run_impl
return_numpy=return_numpy)
File "/home/dell/Projects_module/STT/env/local/lib/python2.7/site-packages/paddle/fluid/executor.py", line 677, in _run_parallel
tensors = exe.run(fetch_var_names)._move_to_list()
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::details::ComputationOpHandle::RunImpl()
5 paddle::framework::details::OpHandleBase::Run(bool)
6 paddle::framework::details::FastThreadedSSAGraphExecutor::RunOpSync(paddle::framework::details::OpHandleBase*)
7 paddle::framework::details::FastThreadedSSAGraphExecutor::RunOp(paddle::framework::details::OpHandleBase*, std::shared_ptr<paddle::framework::BlockingQueue<unsigned long> > const&, unsigned long*)
8 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, void> >::_M_invoke(std::_Any_data const&)
9 std::__future_base::_State_base::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>&, bool&)
10 ThreadPool::ThreadPool(unsigned long)::{lambda()#1}::operator()() const
------------------------------------------
Python Call Stacks (More useful to users):
------------------------------------------
File "/home/dell/Projects_module/STT/env/local/lib/python2.7/site-packages/paddle/fluid/framework.py", line 2525, in append_op
attrs=kwargs.get("attrs", None))
File "/home/dell/Projects_module/STT/env/local/lib/python2.7/site-packages/paddle/fluid/reader.py", line 733, in _init_non_iterable
outputs={'Out': self._feed_list})
File "/home/dell/Projects_module/STT/env/local/lib/python2.7/site-packages/paddle/fluid/reader.py", line 646, in __init__
self._init_non_iterable()
File "/home/dell/Projects_module/STT/env/local/lib/python2.7/site-packages/paddle/fluid/reader.py", line 280, in from_generator
iterable, return_list)
File "/home/dell/Projects_module/STT/DeepSpeech/model_utils/model.py", line 112, in create_network
use_double_buffer=True)
File "/home/dell/Projects_module/STT/DeepSpeech/model_utils/model.py", line 281, in train
train_reader, log_probs, ctc_loss = self.create_network()
File "train.py", line 133, in train
test_off=args.test_off)
File "train.py", line 138, in main
train()
File "train.py", line 142, in <module>
main()
----------------------
Error Message Summary:
----------------------
Error: The fed Variable text_data should have dimensions = 2, shape = [-1, 1], but received fed shape [402]
[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]
Failed in training!