forward() got an unexpected keyword argument 'cross_attn_head_mask'
See original GitHub issue----> 1 paraphrase_t5("Kyle Lowry scored 33 points and Norman Powell added 23 to lift the Toronto Raptors to a 122-125 victory over the Boston Celtics on Wednesday night.")
4 frames
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
1049 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1050 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1051 return forward_call(*input, **kwargs)
1052 # Do not call functions when jit is used
1053 full_backward_hooks, non_full_backward_hooks = [], []
TypeError: forward() got an unexpected keyword argument 'cross_attn_head_mask'
Issue Analytics
- State:
- Created 2 years ago
- Comments:20 (14 by maintainers)
Top Results From Across the Web
forward() got an unexpected keyword argument 'labels' - Stack ...
As far as I know, the BertModel does not take labels in the forward() function. Check out the forward function parameters.
Read more >forward() got an unexpected keyword argument 'labels ...
When I call: model = BertWithFeats(bert_config, params) I get the error ... TypeError: forward() got an unexpected keyword argument 'labels'.
Read more >GNNExplainer import - #21 by mufeili - Deep Graph Library
... non_full_backward_hooks = [], [] TypeError: forward() got an unexpected keyword argument 'graph'. Does this also happen to you?
Read more >TypeError: forward() got an unexpected keyword argument ...
I'm stacked with this model, every day errors came to my code! Anyway I'm trying to implement a Bert Classifier to discriminate between...
Read more >Forward() got an unexpected keyword argument 'pretrained'
I don't know why I am getting this. I even tried to use fastai.vision.models.resnet34() and I still get the error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am having the same issue on latest version of transformers(4.8.0), a workaround would be to downgrade transformers to 4.4.2 and it’ll works. But still needs fixing.
It’s enough to downgrade to 4.6.1. Version 4.4.2 doesn’t have this patch: https://github.com/huggingface/transformers/pull/10651