bert4torch icon indicating copy to clipboard operation
bert4torch copied to clipboard

一个可能的小问题

Open Uchiha-Monroe opened this issue 2 years ago • 1 comments

在脚本layers.py中55行,cond = cond.unsqueeze(dim=1),这里的dim应该是等于0吧,调试发现是不太对的,老哥确认下

Uchiha-Monroe avatar Jun 25 '22 09:06 Uchiha-Monroe

在脚本layers.py中55行,cond = cond.unsqueeze(dim=1),这里的dim应该是等于0吧,调试发现是不太对的,老哥确认下

你调试发现哪里不太对啊,我看了下感觉应该还是dim=1吧,第0维是batch_size维度吧,我刚刚使用task_conditional_language_model.py这个示例来看的;此外我看了下bert4keras源代码,应该也是cond = K.expand_dims(cond, 1),你这边具体看下是啥问题?

Tongjilibo avatar Jun 25 '22 15:06 Tongjilibo