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

TypeError: __new__() missing 1 required positional argument: 'attention_state' #83

Open
zhyb opened this issue Sep 26, 2019 · 1 comment

Comments

@zhyb
Copy link

zhyb commented Sep 26, 2019

when I run 'python3 aster/demo.py'.Errors occurred as follows:

TypeError: in converted code:

/home/zyb/aster/core/sync_attention_wrapper.py:78 call
    alignment_history=self._item_or_tuple(all_histories))

TypeError: __new__() missing 1 required positional argument: 'attention_state'
@chahalinder0007
Copy link

I did face the exact same issue, the problem is in the _compute_attention() function in line: 52

As is evident from the tensorflow source code the function returns three things :

attention, alignments, next_attention_state

The attention_state has not been accounted for when calling the function and therefore the missing value is actually this next_attention_state that has not been passed on to the AttentionWrapper. I have created a pull request for the same, which is accessible here.

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

No branches or pull requests

2 participants