Welcome to the Linux Foundation Forum!

08 > NLP > NLP: Attaching a Head - output.shape or output.logits.shape?

See the below bolded text. It was otherwise difficult to see.

This is the course:

I did try running but got:

I think the fix is adding '.logits':

Please let me know if it was just the case of an update changing the parameter or if I am displaying something else not intended. Thank you.

Best Answer

  • dvgodoy
    dvgodoy Posts: 16
    Answer ✓

    Hi @p.hanel ,

    You're right, we're supposed to read the logits. Thank you for pointing it out.

    It should read:

    model_with_head.eval()
    output = model_with_head(model_input)
    output, output.logits.shape
    

    Best,
    Daniel

Answers

Categories

Upcoming Training