hasanhuz / SpanEmo

SpanEmo
Other
60 stars 21 forks source link

discussion on previous issue :) #3

Closed darsh169 closed 3 years ago

darsh169 commented 3 years ago

@hasanhuz.. Just for confirmation.. doesn't line- last_hidden_state, pooler_output = self.bert(input_ids=input_ids) returns last_hidden_state as a string rather than a tensor?

hasanhuz commented 3 years ago

Hi Darshan, Nope, It returned a tensor of the shape (batch, seq_length, hidden_dim). Have you tested the code and got a string?

darsh169 commented 3 years ago

Yeah I got string at first that's why modified it

hasanhuz commented 3 years ago

It must be something wrong on your end, have you used the same huggingface transformer version as specified in the requirement.txt? I'd also suggest that you take a look at the Huggingface documentation, which can clarify what the output of BERT model looks like.

darsh169 commented 3 years ago

Yeah there is issue with versions Thanks !

hasanhuz commented 3 years ago

No worries, glad that it worked out :)