在使用reader.py测试自定义数据集时出错
Created by: yeyupiaoling
- 我使用自己的自定义数据集时,在运行这行代码测试时报错https://github.com/PaddlePaddle/models/blob/develop/image_classification/reader.py#L51
if __name__ == '__main__':
for im in train_reader('train.list'):
print len(im[0])
for im in train_reader('test.list'):
print len(im[0])
- 报错如下
E
Error
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/case.py", line 329, in run
testMethod()
File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
TypeError: test_mapper() takes exactly 1 argument (0 given)
E
======================================================================
ERROR: map image path to type needed by model input layer for the test set
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
TypeError: test_mapper() takes exactly 1 argument (0 given)
======================================================================
ERROR: imageclassify.reader.test_reader
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
TypeError: test_reader() takes at least 1 argument (0 given)
----------------------------------------------------------------------
Ran 2 tests in 0.004s
FAILED (errors=2)
Error
Traceback (most recent call last):
File "/usr/lib/python2.7/unittest/case.py", line 329, in run
testMethod()
File "/usr/local/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
TypeError: test_reader() takes at least 1 argument (0 given)