Modify this PyTorch pseudo-code to perform negative sampling if the pos_ids are known: label #shape=[batch_s, pos_ids] hidden #shape=[batch_s, ch] logits #shape=[ch, C] out=np.dot(logits, hidden(X)) #shape=[batch_s, C] loss=cross_entropy(out, label)
Unlock detailed company stats for this questionUpgrade
Community answers
No answers contributed by the community yet.
Related courses

Course

Course
Course
