使用outputs打印训练过程中的准确率出现问题
Created by: leanna62
训练过程中,想打印 auc_evaluator的值,以下这种写法是有问题的吗?会报错,错误信息如下,请问是什么原因呢? Traceback (most recent call last): File "python27/lib/python2.7/site-packages/paddle/trainer/config_parser.py", line 3600, in parse_config_and_serialize config = parse_config(trainer_config, config_arg_str) File "python27/lib/python2.7/site-packages/paddle/trainer/config_parser.py", line 3593, in parse_config make_config_environment(trainer_config, config_args)) File "rnn.py", line 44, in outputs(loss, eval) File "python27/lib/python2.7/site-packages/paddle/trainer_config_helpers/networks.py", line 1460, in outputs assert isinstance(each_layer, LayerOutput) AssertionError F0611 15:35:46.080998 24856 PythonUtil.cpp:131] Check failed: (ret) != nullptr Current PYTHONPATH: ['/usr/local/opt/paddle/bin', 'paddle/rnn_train', 'python27/lib/python2.7/site-packages', '/python27/lib/python27.zip', '/python27/lib/python2.7', '/python27/lib/python2.7/plat-linux2', 'python27/lib/python2.7/lib-tk', 'python27/lib/python2.7/lib-old', '/python27/lib/python2.7/lib-dynload'] Python Error: <type 'exceptions.AssertionError'> : Python Callstack: python27/lib/python2.7/site-packages/paddle/trainer/config_parser.py : 3600 python27/lib/python2.7/site-packages/paddle/trainer/config_parser.py : 3593 rnn.py : 44 python27/lib/python2.7/site-packages/paddle/trainer_config_helpers/networks.py : 1460 Call Object failed. *** Check failure stack trace: *** @ 0x99cdbd google::LogMessage::Fail() @ 0x9a086c google::LogMessage::SendToLog() @ 0x99c8e3 google::LogMessage::Flush() @ 0x9a1d7e google::LogMessageFatal::~LogMessageFatal() @ 0x8eaa6a paddle::callPythonFuncRetPyObj() @ 0x8eac4c paddle::callPythonFunc() @ 0x7c5553 paddle::TrainerConfigHelper::TrainerConfigHelper() @ 0x7c5b94 paddle::TrainerConfigHelper::createFromFlags() @ 0x601dd2 main @ 0x7fa0ab916bd5 __libc_start_main @ 0x61a575 (unknown) @ (nil) (unknown) /usr/local/bin/paddle: line 113: 24856 Aborted ${DEBUGGER} $MYDIR/../opt/paddle/bin/paddle_trainer ${@:2} 配置文件的写法如下: net = data_layer('data', size=vocab_size) net = embedding_layer(input=net, size=128) for i in xrange(lstm_num): net = simple_lstm(input=net, size=hidden_size) net = last_seq(input=net) net = fc_layer(input=net, size=2, act=SoftmaxActivation()) lab = data_layer('label', num_class) loss = classification_cost(input=net, label=lab) eval = auc_evaluator(net, lab) outputs(loss, eval)