-
Notifications
You must be signed in to change notification settings - Fork 3.1k
-
when i run the 'erniecrffortokenclassification.py',There was a strange bug,
like this ;'TypeError: forward() missing 1 required positional argument: 'labels''
This error is happend in Fluid DyGraph's Layers.py
But I obviously passed in labels, otherwise the error would be in the line 65
64 if labels is not None:
---> 65 loss = self.crf_loss(logits, lengths, labels)
66 return loss
67 else:
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/dygraph/layers.py in call(self, *inputs, **kwargs)
900 self._built = True
901
--> 902 outputs = self.forward(*inputs, **kwargs)
903
904 for forward_post_hook in self._forward_post_hooks.values():
TypeError: forward() missing 1 required positional argument: 'labels'
Beta Was this translation helpful? Give feedback.
All reactions
-
👀 2
Could you provide your paddlenlp version and paddlepaddle version?
Please make sure you are using the latest version.
Replies: 1 comment 4 replies
-
Could you provide your paddlenlp version and paddlepaddle version?
Please make sure you are using the latest version.
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
😄 1
-
Em, I checked that the version of the module is 2.0.0rc7, is it because the version does not match?
Beta Was this translation helpful? Give feedback.
All reactions
-
😄 1
-
Maybe @daidaiJ Please upgrade to the latest version rc18 and try again.
Beta Was this translation helpful? Give feedback.
All reactions
-
thanks , ahhhh~
Beta Was this translation helpful? Give feedback.