alibaba-edu / simple-effective-text-matching-pytorch

A pytorch implementation of the ACL2019 paper "Simple and Effective Text Matching with Richer Alignment Features".
Apache License 2.0
304 stars 54 forks source link

Error #3

Closed jc-ryan closed 4 years ago

jc-ryan commented 4 years ago

运行时自定义的Conv1d出现'module' object is not callable的错误:

File "/home/ryan/code/TMBaselines/modules/CNNEncoder.py", line 43, in __init__ kernel_sizes=args.kernel_sizes) for i in range(args.enc_layers)]) File "/home/ryan/code/TMBaselines/modules/CNNEncoder.py", line 43, in <listcomp> kernel_sizes=args.kernel_sizes) for i in range(args.enc_layers)]) File "/home/ryan/code/TMBaselines/modules/CNNEncoder.py", line 24, in __init__ convs.append(nn.Sequential(nn.utils.weight_norm(conv), GeLU())) TypeError: 'module' object is not callable

反复检查了没有发现错误,请问作者遇到过这个情况吗?

hitvoice commented 4 years ago

抱歉比较迟才回复,后面发现是什么问题?

hitvoice commented 4 years ago

我之前没有遇到过这个情况

jc-ryan commented 4 years ago

抱歉比较迟才回复,后面发现是什么问题?

是我在模块导入时的失误,不是您的代码问题,打扰了谢谢

hitvoice commented 4 years ago

好的,没事儿