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

paddle v2 dssm demo 训练报错 #3573

Closed
gonghaie opened this issue Aug 18, 2017 · 2 comments · Fixed by PaddlePaddle/models#212
Closed

paddle v2 dssm demo 训练报错 #3573

gonghaie opened this issue Aug 18, 2017 · 2 comments · Fixed by PaddlePaddle/models#212
Assignees
Labels
User 用于标记用户问题

Comments

@gonghaie
Copy link

gonghaie commented Aug 18, 2017

  • 把dssm拉到测试机上之后,在dssm目录下运行以下命令正常输出model:
    python train.py --model_type 1 --model_arch 0 --model_output_prefix "model_dir/" --class_num 2
  • 但是,将命令改为以下参数之后,训练报错:
    python train.py --model_type 1 --model_arch 2 --model_output_prefix "model_dir/" --class_num 2
    报错日志如下:
Traceback (most recent call last):
  File "train.py", line 267, in <module>
    use_gpu=args.use_gpu)
  File "train.py", line 186, in train
    share_embed=share_embed)()
  File "/home/yanchunwei/third_party/haie/dssm/network_conf.py", line 73, in __call__
    return self.model_type_creater()
  File "/home/yanchunwei/third_party/haie/dssm/network_conf.py", line 207, in _build_rank_model
    x = self.model_arch_creater(input, prefix=prefixs[id])
  File "/home/yanchunwei/third_party/haie/dssm/network_conf.py", line 57, in _model_arch_creater
    sent_vec = _model_arch.get(str(model_arch))(emb, prefix)
  File "/home/yanchunwei/third_party/haie/dssm/network_conf.py", line 106, in create_rnn
    input=emb)
  File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/v2/config_base.py", line 52, in wrapped
    out = f(*args, **xargs)
  File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
    return func(*args, **kwargs)
  File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
    return func(*args, **kwargs)
  File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
    return func(*args, **kwargs)
  File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
    return func(*args, **kwargs)
  File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/trainer_config_helpers/default_decorators.py", line 53, in __wrapper__
    return func(*args, **kwargs)
  File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/trainer_config_helpers/layers.py", line 350, in wrapper
    return method(*args, **kwargs)
  File "/home/yanchunwei/third_party/paddle_env/python27/lib/python2.7/site-packages/paddle/trainer_config_helpers/layers.py", line 1345, in grumemory
    assert input.size is not None and input.size % 3 == 0
AssertionError
  • 初步怀疑此分支没有进行单元测试。
@lcy-seso lcy-seso added the User 用于标记用户问题 label Aug 20, 2017
@luotao1
Copy link
Contributor

luotao1 commented Aug 21, 2017

@NHZlX 和我复现 python train.py --model_type 1 --model_arch 2 --model_output_prefix "model_dir/" --class_num 2后出现的问题:

Traceback (most recent call last):
  File "train.py", line 266, in <module>
    use_gpu=args.use_gpu)
  File "train.py", line 186, in train
    share_embed=share_embed)()
  File "/home/luotao02/models/dssm/network_conf.py", line 73, in __call__
    return self.model_type_creater()
  File "/home/luotao02/models/dssm/network_conf.py", line 207, in _build_rank_model
    x = self.model_arch_creater(input, prefix=prefixs[id])
  File "/home/luotao02/models/dssm/network_conf.py", line 57, in _model_arch_creater
    sent_vec = _model_arch.get(str(model_arch))(emb, prefix)
  File "/home/luotao02/models/dssm/network_conf.py", line 105, in create_rnn
    gru = paddle.layer.gru_memory(
AttributeError: 'module' object has no attribute 'gru_memory'

@Superjomn
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User 用于标记用户问题
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants