run PaddleClas infer.py ERROR
Created by: dbcool
my infer.sh: export PYTHONPATH=$PWD:$PYTHONPATH
python -m paddle.distributed.launch
--selected_gpus="0"
tools/infer/infer.py -i "dataset/FGVC2020_SSFGRC/test/26.jpg"
-m "SENet154_vd"
-p "output/expr20_SENet154_vd_train_bestv1_25971.txt_val2000_val2750_78.84"
ERROR: Traceback (most recent call last): File "tools/infer/infer.py", line 121, in main() File "tools/infer/infer.py", line 113, in main return_numpy=False) File "/home/daibing/software/anaconda2/lib/python2.7/site-packages/paddle/fluid/executor.py", line 790, in run six.reraise(*sys.exc_info()) File "/home/daibing/software/anaconda2/lib/python2.7/site-packages/paddle/fluid/executor.py", line 785, in run use_program_cache=use_program_cache) File "/home/daibing/software/anaconda2/lib/python2.7/site-packages/paddle/fluid/executor.py", line 838, in _run_impl use_program_cache=use_program_cache) File "/home/daibing/software/anaconda2/lib/python2.7/site-packages/paddle/fluid/executor.py", line 909, in _run_program self._feed_data(program, feed, feed_var_name, scope) File "/home/daibing/software/anaconda2/lib/python2.7/site-packages/paddle/fluid/executor.py", line 591, in _feed_data check_feed_shape_type(var, cur_feed) File "/home/daibing/software/anaconda2/lib/python2.7/site-packages/paddle/fluid/executor.py", line 230, in check_feed_shape_type (var.name, len(var.shape), var.shape, feed_shape)) ValueError: The fed Variable u'image' should have dimensions = 4, shape = (-1L, 3L, 224L, 224L), but received fed shape [3L, 224L, 224L] on each device