input data_feeder order bug
Created by: dzhwinter
which index determine the data_feeder order during training a model? it is the generator, the feeding argument in trainer or the layer order in model?
# data generater
yield relevance_score_list[i], np.array(feature_vector_list[i])
# their type is int, np.array(shape=(1, 46)) respectively
#model layer order
label = paddle.layer.data("label", paddle.data_type.integer_value_sequence(1))
data = paddle.layer.data("data", paddle.data_type.dense_vector(feature_dim))
#feeding dict order with index
feeding = {"label":0,
"data": 1}
trainer.train(reader=train_reader,
event_handler=event_handler,
feeding=feeding,
num_passes=num_passes)
everywhere in my model i configurate the order of [label,data]
, but the log information tell that input order is [data, label]
I0508 21:56:25.619045 17006 Util.cpp:166] commandline: --use_gpu=False --trainer_count=4
[INFO 2017-05-08 21:56:25,626 networks.py:1472] The input order is [data, label]
[INFO 2017-05-08 21:56:25,626 networks.py:1478] The output order is [__lambda_cost_0__]
[INFO 2017-05-08 21:56:25,630 networks.py:1472] The input order is [data, label]
[INFO 2017-05-08 21:56:25,630 networks.py:1478] The output order is [__lambda_cost_0__]
the error log as shown, which is the reason for my suspicion. it complain about int type input, which should be the second input in my configuration.l
Traceback (most recent call last):
File "lambdaRank.py", line 100, in <module>
train_lambdaRank(2)
File "lambdaRank.py", line 79, in train_lambdaRank
num_passes=num_passes)
File "/home/work/fengjiayi/paddle_internal_release_tools/idl/paddle/output/python27-gcc482/lib/python2.7/site-packages/paddle/v2/trainer.py", line 114, in t
rain
feeder(data_batch), out_args, pass_type)
File "/home/work/fengjiayi/paddle_internal_release_tools/idl/paddle/output/python27-gcc482/lib/python2.7/site-packages/py_paddle/dataprovider_converter.py"$
line 249, in __call__
return self.convert(dat, argument)
File "/home/work/fengjiayi/paddle_internal_release_tools/idl/paddle/output/python27-gcc482/lib/python2.7/site-packages/paddle/v2/data_feeder.py", line 134,
in convert
return DataProviderConverter.convert(self, reorder_data(dat), argument)
File "/home/work/fengjiayi/paddle_internal_release_tools/idl/paddle/output/python27-gcc482/lib/python2.7/site-packages/py_paddle/dataprovider_converter.py",
line 234, in convert
scanner.pre_scan(each_step)
File "/home/work/fengjiayi/paddle_internal_release_tools/idl/paddle/output/python27-gcc482/lib/python2.7/site-packages/py_paddle/dataprovider_converter.py",
line 191, in pre_scan
for each in dat:
TypeError: 'int' object is not iterable