This commit is contained in:
Eren Golge 2018-05-02 04:56:52 -07:00
parent a4561c5096
commit ccd91a67d0
1 changed files with 2 additions and 1 deletions

View File

@ -102,7 +102,8 @@ def train(model, criterion, criterion_st, data_loader, optimizer, epoch):
linear_spec = linear_spec.cuda()
stop_target = stop_target.cuda()
stop_target = stop_target.view(B, stop_target.size(1) // c.r, -1)
stop_target = stop_target.view(c.batch_size, stop_target.size(1) // c.r, -1)
import ipdb; ipdb.set_trace()
stop_target = (stop_target.sum(1) > 0.0).long()
# create attention mask