Spaces:
Runtime error
Runtime error
Commit
·
de119d1
1
Parent(s):
83a6f3d
hmm
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ def respond(input):
|
|
46 |
trg_mask = torch.autograd.Variable(torch.from_numpy(trg_mask) == 0).to(device)
|
47 |
|
48 |
out = model.out(model.decoder(outputs[:i].unsqueeze(0), e_outputs, src_mask, trg_mask))
|
49 |
-
out = torch.nn.functional.softmax(out, dim=-1).detach()
|
50 |
print(out[:, -1].data[0])
|
51 |
print(out[:, -1].data[0].shape)
|
52 |
print(np.sum(out[:, -1].data[0]))
|
|
|
46 |
trg_mask = torch.autograd.Variable(torch.from_numpy(trg_mask) == 0).to(device)
|
47 |
|
48 |
out = model.out(model.decoder(outputs[:i].unsqueeze(0), e_outputs, src_mask, trg_mask))
|
49 |
+
out = torch.nn.functional.softmax(out, dim=-1).detach().numpy()
|
50 |
print(out[:, -1].data[0])
|
51 |
print(out[:, -1].data[0].shape)
|
52 |
print(np.sum(out[:, -1].data[0]))
|