运行nested_sequence目录下的文本分类的例子出错
Created by: peterzhang2029
执行python train.py
后报错:
[CRITICAL 2017-12-01 16:59:20,940 layers.py:1058] When the name field of param_attr is manually specified and the input is a list, the param_attr should also be a list with each item being the param_attr for each input item. If only one named param_attr is provided, all the input items would share this parameter.
Traceback (most recent call last):
File "train.py", line 195, in <module>
train()
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "train.py", line 150, in train
cost, prob, label = nested_net(dict_dim, class_num, is_infer=False)
File "/home/zhangchao/code/models/models/nested_sequence/text_classification/network_conf.py", line 47, in nested_net
step=cnn_cov_group)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/v2/config_base.py", line 52, in wrapped
out = f(*args, **xargs)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
return func(*args, **kwargs)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/trainer_config_helpers/layers.py", line 4068, in recurrent_group
layer_outs = step(*in_args)
File "/home/zhangchao/code/models/models/nested_sequence/text_classification/network_conf.py", line 25, in cnn_cov_group
act=paddle.activation.Linear())
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/v2/config_base.py", line 52, in wrapped
out = f(*args, **xargs)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
return func(*args, **kwargs)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
return func(*args, **kwargs)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
return func(*args, **kwargs)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
return func(*args, **kwargs)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/trainer_config_helpers/layers.py", line 410, in wrapper
return method(*args, **kwargs)
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/trainer_config_helpers/layers.py", line 1058, in fc_layer
"When the name field of param_attr is manually specified "
File "/home/zhangchao/.jumbo/lib/python2.7/site-packages/paddle/trainer/config_parser.py", line 4228, in my_fatal
raise Exception()
Exception
主要是由于fc_layer的更新,使得不能默认的共享参数,导致报错。