使用GPU时paddle.infer出错,ValueError: The input should be a vector, please check your input data.
Thank you for contributing to PaddlePaddle. Submitting an issue is a great help for us. Both Chinese and English issues are welcome.
It's hard to solve a problem when important details are missing. Before submitting the issue, look over the following criteria before handing your request in.
- [ ] Was there a similar issue submitted or resolved before ? You could search issue in the github.
- [ ] Did you retrieve your issue from widespread search engines ?
- [ ] Is my description of the issue clear enough to reproduce this problem?
- If some errors occurred, we need details about
how do you run your code?,what system do you use?,Are you using GPU or not?, etc. - If you use an recording asciinema to show what you are doing to make it happen, that's awesome! We could help you solve the problem more quickly.
- If some errors occurred, we need details about
- [ ] Is my description of the issue use the github markdown correctly?
- Please use the proper markdown syntaxes for styling all forms of writing, e.g, source code, error information, etc.
- Check out this page to find out much more about markdown.
/usr/local/lib/python2.7/dist-packages/py_paddle/dataprovider_converter.pyc in convert(self, dat, argument) 265 for each_sample in dat: 266 for each_step, scanner in itertools.izip(each_sample, scanners): --> 267 scanner.pre_scan(each_step) 268 269 for scanner in scanners:
/usr/local/lib/python2.7/dist-packages/py_paddle/dataprovider_converter.pyc in pre_scan(self, dat) 112 if len(self.shape) == 0: 113 raise ValueError( --> 114 "The input should be a vector, please check your input data." 115 ) 116 self.dim = reduce(lambda x, y: x * y, self.shape)
ValueError: The input should be a vector, please check your input data. 不使用GPU时正常
看起来跟是否是GPU没有太大关系,应该是数据格式有问题,能否尝试定位一下是哪条样本导致的exception?
Close this inactive issue, please feel free to reopen it.