You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
530 result = self._slow_forward(*input, **kwargs)
531 else:
--> 532 result = self.forward(*input, **kwargs)
533 for hook in self._forward_hooks.values():
534 hook_result = hook(self, input, result)
TypeError: forward() got an unexpected keyword argument 'device'_
`
I think the reason for this problem is that there is missing the 'freeze_bert'-argument in the forward-method of the model architecture (document_bert_architectures.py).
Thanks for response.
The text was updated successfully, but these errors were encountered:
Hello,
thanks for sharing your code.
I am new to BERT and finetuning and I tried your code with costumn data.
I recieved following error on running DocumentBertMaxPool/DocumentBertLinear:
_` batch_predictions = self.bert_doc_classification(batch_document_tensors,
185 batch_document_sequence_lengths,
--> 186 freeze_bert=self.args['freeze_bert'], device=self.args['device'])
187
188 batch_correct_output = correct_output[i:i + self.args['batch_size']].to(device=self.args['device'])
/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py in call(self, *input, **kwargs)
530 result = self._slow_forward(*input, **kwargs)
531 else:
--> 532 result = self.forward(*input, **kwargs)
533 for hook in self._forward_hooks.values():
534 hook_result = hook(self, input, result)
TypeError: forward() got an unexpected keyword argument 'device'_
`
I think the reason for this problem is that there is missing the 'freeze_bert'-argument in the forward-method of the model architecture (document_bert_architectures.py).
Thanks for response.
The text was updated successfully, but these errors were encountered: