I was wondering when it makes sense to pass the hidden states and attentions and when not? The hidden states are anyway being calculated, no matter whether I pass them or not, right?
As seen here:
The
outputs
object is aSequenceClassifierOutput
, as we can see in the documentation of that class below, it means it has an optionalloss
, alogits
an optionalhidden_states
and an optionalattentions
attribute. Here we have theloss
since we passed alonglabels
, but we don’t havehidden_states
andattentions
because we didn’t passoutput_hidden_states=True
oroutput_attentions=True
.