kevinduh / san_mrc

Stochastic Answer Networks (SAN) for Machine Reading Comprehension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I wonder why do log_softmax twice on the prediction logits?

lixinsu opened this issue · comments

commented

As depicted in code bellow .

start_scores = torch.log(start_scores)
.
loss = F.cross_entropy(start, y[0]) + F.cross_entropy(end, y[1])
.

commented

Is this a special procedure for SAN module?

It is only to make the api consistence, which is output of logits.