Spaces:
Runtime error
Runtime error
Commit
·
83a6f3d
1
Parent(s):
6dcbe54
this should not be hard
Browse files
app.py
CHANGED
@@ -47,6 +47,8 @@ def respond(input):
|
|
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(np.sum(out[:, -1].data[0]))
|
51 |
ix = np.random.choice(np.arange(len(out[:, -1].data[0])), 1, p=out[:, -1].data[0])
|
52 |
# val, ix = out[:, -1].data.topk(1)
|
|
|
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]))
|
53 |
ix = np.random.choice(np.arange(len(out[:, -1].data[0])), 1, p=out[:, -1].data[0])
|
54 |
# val, ix = out[:, -1].data.topk(1)
|