Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行nested_sequence目录下的文本分类的例子出错 #512

Closed
peterzhang2029 opened this issue Dec 1, 2017 · 0 comments · Fixed by #513
Closed

运行nested_sequence目录下的文本分类的例子出错 #512

peterzhang2029 opened this issue Dec 1, 2017 · 0 comments · Fixed by #513

Comments

@peterzhang2029
Copy link
Contributor

执行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的更新,使得不能默认的共享参数,导致报错。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant