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

关于代码中Transformer输入格式的疑惑 #12

Closed
juemifuji opened this issue Nov 26, 2019 · 3 comments · Fixed by #35
Closed

关于代码中Transformer输入格式的疑惑 #12

juemifuji opened this issue Nov 26, 2019 · 3 comments · Fixed by #35

Comments

@juemifuji
Copy link

你好!我看代码里面Transformer输入是TR([tr_input[i], tr_input[i]]),但是其具体函数定义格式又是:def call(self, inputs, mask=None, training=None, **kwargs),其中的参数mask,要求是和tr_input[i]同shape或者是(batch_size, 1),不知道是不是我哪里有遗漏,谢谢!

@shenweichen
Copy link
Owner

输入的时候输入的是一个list作为inputs参数传入,mask参数取的是默认值None

@muGithub
Copy link

输入的时候输入的是一个list作为inputs参数传入,mask参数取的是默认值None

你好,如果mask参数取默认值“None”,则会报以下错误:
query_masks, key_masks = mask
TypeError: 'NoneType' object is not iterable
该如何解决呢?

@muGithub
Copy link

muGithub commented Oct 22, 2022 via email

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.

3 participants