{"action":"created","issue":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/595","repository_url":"https://api.github.com/repos/PaddlePaddle/Paddle","labels_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/595/labels{/name}","comments_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/595/comments","events_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/595/events","html_url":"https://github.com/PaddlePaddle/Paddle/issues/595","id":191450043,"number":595,"title":"自己配置网络运行出core","user":{"login":"AoZhang","id":3005456,"avatar_url":"https://avatars.githubusercontent.com/u/3005456?v=3","gravatar_id":"","url":"https://api.github.com/users/AoZhang","html_url":"https://github.com/AoZhang","followers_url":"https://api.github.com/users/AoZhang/followers","following_url":"https://api.github.com/users/AoZhang/following{/other_user}","gists_url":"https://api.github.com/users/AoZhang/gists{/gist_id}","starred_url":"https://api.github.com/users/AoZhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AoZhang/subscriptions","organizations_url":"https://api.github.com/users/AoZhang/orgs","repos_url":"https://api.github.com/users/AoZhang/repos","events_url":"https://api.github.com/users/AoZhang/events{/privacy}","received_events_url":"https://api.github.com/users/AoZhang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-24T07:27:10Z","updated_at":"2016-11-24T09:17:53Z","closed_at":null,"body":"成功安装后可以跑通quick_start，但是尝试自己配置网络结构、跑quick_start的数据时出core。\r\n\r\n无embedding层的时候，\r\n```\r\ndata -> fc_layer -> fc_layer -> output\r\n```\r\n是可以跑成功的。\r\n\r\n加入embedding层后，\r\n```\r\ndata -> emb -> fc_layer -> output\r\n```\r\n训练会出core，日志如下：\r\n```\r\nI1124 15:22:31.418560 11872 Util.cpp:155] commandline: /path/to/paddle/output/bin/../opt/paddle/bin/paddle_trainer --config trainer_config.me.py --use_gpu=false --log_period=20 --save_dir=./output.me.emb --num_passes=15\r\nI1124 15:22:31.418912 11872 Util.cpp:130] Calling runInitFunctions\r\nI1124 15:22:31.419441 11872 Util.cpp:143] Call runInitFunctions done.\r\n[INFO 2016-11-24 15:22:31,799 networks.py:1145] The input order is [word, label]\r\n[INFO 2016-11-24 15:22:31,799 networks.py:1152] The output order is [__cost_0__]\r\nI1124 15:22:31.817416 11872 Trainer.cpp:170] trainer mode: Normal\r\nI1124 15:22:31.941279 11872 PyDataProvider2.cpp:257] loading dataprovider dataprovider_emb::process\r\nI1124 15:22:31.974423 11872 PyDataProvider2.cpp:257] loading dataprovider dataprovider_emb::process\r\nI1124 15:22:31.974829 11872 GradientMachine.cpp:134] Initing parameters..\r\nI1124 15:22:32.173585 11872 GradientMachine.cpp:141] Init parameters done.\r\nI1124 15:23:15.201149 11880 ThreadLocal.cpp:37] thread use undeterministic rand seed:11881\r\nF1124 15:23:15.350517 11872 Matrix.cpp:2813] Check failed: label.getSize() == numSamples (128 vs. 17976)\r\n*** Check failure stack trace: ***\r\n    @           0xec7d7c  google::LogMessage::Fail()\r\n    @           0xec7cd4  google::LogMessage::SendToLog()\r\n    @           0xec7769  google::LogMessage::Flush()\r\n    @           0xeca52a  google::LogMessageFatal::~LogMessageFatal()\r\n    @           0x810cb5  paddle::CpuMatrix::oneHotCrossEntropy()\r\n    @           0x63f0c5  paddle::CostLayer::forward()\r\n    @           0x6d6064  paddle::NeuralNetwork::forward()\r\n    @           0x5d4853  paddle::GradientMachine::forwardBackward()\r\n    @           0x749683  paddle::TrainerInternal::forwardBackwardBatch()\r\n    @           0x74a038  paddle::TrainerInternal::trainOneBatch()\r\n    @           0x744f2f  paddle::Trainer::trainOnePass()\r\n    @           0x748807  paddle::Trainer::train()\r\n    @           0x58ec16  main\r\n    @     0x7f4c77974bd5  __libc_start_main\r\n    @           0x59ad49  (unknown)\r\n/path/to/paddle/output/bin/paddle: line 81: 11872 Aborted                 (core dumped) ${DEBUGGER} $MYDIR/../opt/paddle/bin/paddle_trainer ${@:2}\r\n```\r\n网络配置代码如下：\r\n```\r\nbias_attr = ParamAttr(initial_std=0.,l2_rate=0.)\r\ndata = data_layer(name=\"word\", size=len(word_dict))\r\nemb = embedding_layer(input=data, size=64)\r\n#pool = pooling_layer(input=emb, pooling_type=AvgPooling())\r\nfc = fc_layer(input=emb, size=256, act=LinearActivation(),\r\n        bias_attr=bias_attr,\r\n        layer_attr=ExtraAttr(drop_rate=0.1))\r\noutput = fc_layer(input=fc, size=2, act=SoftmaxActivation())\r\n```\r\n\r\n在fc_layer之前或之后加入一个pooling_layer都可以解决出core的问题，能帮忙解释一下吗？谢谢！"},"comment":{"url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/comments/262727004","html_url":"https://github.com/PaddlePaddle/Paddle/issues/595#issuecomment-262727004","issue_url":"https://api.github.com/repos/PaddlePaddle/Paddle/issues/595","id":262727004,"user":{"login":"AoZhang","id":3005456,"avatar_url":"https://avatars.githubusercontent.com/u/3005456?v=3","gravatar_id":"","url":"https://api.github.com/users/AoZhang","html_url":"https://github.com/AoZhang","followers_url":"https://api.github.com/users/AoZhang/followers","following_url":"https://api.github.com/users/AoZhang/following{/other_user}","gists_url":"https://api.github.com/users/AoZhang/gists{/gist_id}","starred_url":"https://api.github.com/users/AoZhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AoZhang/subscriptions","organizations_url":"https://api.github.com/users/AoZhang/orgs","repos_url":"https://api.github.com/users/AoZhang/repos","events_url":"https://api.github.com/users/AoZhang/events{/privacy}","received_events_url":"https://api.github.com/users/AoZhang/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T09:17:53Z","updated_at":"2016-11-24T09:17:53Z","body":"是指这个吗\r\n```\r\ndefine_py_data_sources2(train_list=trn,\r\n                        test_list=tst,\r\n                        module=\"dataprovider_emb\",\r\n                        obj=process,\r\n                        args={\"dictionary\": word_dict})\r\n```"}}
{"actor":{"display_login":"AoZhang"}}