Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

新版Paddle里的dataprovider.py 中怎么处理多个slot的稀疏特征时,有点样本的某些slotid 中没有特征的情况?

Open buptzzl opened this issue 9 years ago • 4 comments

之前旧版paddle中 在PB化时,对应有多个slot的样本,自动支持slot 层面的稀疏特征处理。 迁移到 新的dataprovider.py 中时怎么处理?

buptzzl avatar Feb 04 '17 08:02 buptzzl

使用dict 方式设置 dataprovider 的input_types后, process() 部分的代码还没执行到就跑错。

I0204 20:10:26.699952 11645 Util.cpp:144] commandline: /home/zhouliaoming01/.jumbo/bin/../opt/paddle/bin/paddle_trainer --conf
ig=trainer_config.base.py --save_dir=./output --trainer_count=10 --log_period=100 --num_passes=5 --use_gpu=false --show_parame
ter_stats_period=100 --test_all_data_in_one_period=1
I0204 20:10:26.700161 11645 Util.cpp:113] Calling runInitFunctions
I0204 20:10:26.700484 11645 Util.cpp:126] Call runInitFunctions done.
[debug] trainer_config.conf
[WARNING 2017-02-04 20:10:26,840 default_decorators.py:40] please use keyword arguments in paddle config.
[INFO 2017-02-04 20:10:26,841 networks.py:1122] The input order is [input0, input1, input2, input3, input4, input5, input6, input7, input8, input9, input10, label]
[INFO 2017-02-04 20:10:26,841 networks.py:1129] The output order is [__cost_0__]
I0204 20:10:26.845000 11645 Trainer.cpp:121] ignore sparse_remote_update=true due to  --local=true
I0204 20:10:26.845026 11645 Trainer.cpp:166] trainer mode: SgdSparseCpuTraining
I0204 20:10:26.865993 11645 PyDataProvider2.cpp:219] loading dataprovider dataprovider::process
F0204 20:10:26.867472 11645 PythonUtil.h:197] Check failed: PySequence_Check(seq_) 
*** Check failure stack trace: ***
    @     0x7f866dcedb6d  google::LogMessage::Fail()
    @     0x7f866dcf1b87  google::LogMessage::SendToLog()
    @     0x7f866dcefa09  google::LogMessage::Flush()
    @     0x7f866dcefd0d  google::LogMessageFatal::~LogMessageFatal()
    @           0x6b4992  paddle::PyDataProvider2::readPyFields()
    @           0x6b5a36  paddle::PyDataProvider2::PyDataProvider2()
    @           0x6b5d12  _ZNSt17_Function_handlerIFPN6paddle12DataProviderENS0_10DataConfigEbEZNS0_14ClassRegistrarIS1_IS3_bEE13registerClassINS0_15PyDataProvider2EEEvRKSsEUlS3_bE_E9_M_invokeERKSt9_Any_dataS3_b
    @           0x6acd8e  paddle::DataProvider::create()
    @           0x717f29  paddle::Trainer::init()
    @           0x543d3a  main
    @     0x7f866cfbfd1d  __libc_start_main

buptzzl avatar Feb 04 '17 12:02 buptzzl

请先使用最新版本。因为这块的API在0.8.0到0.9.0之间有一次修改。目前文档是按照0.9.0写的。

reyoung avatar Feb 07 '17 01:02 reyoung

另外,如果是新的事情,最好开一个全新的issue

reyoung avatar Feb 07 '17 01:02 reyoung

@reyang 谢谢,我重新开一个

buptzzl avatar Feb 07 '17 02:02 buptzzl