Skip to content

Commit ec0ae30

Browse files
authored
Merge pull request tech-srl#8 from onewhl/master
Fixed computing the scores
2 parents c8c49e5 + 8703513 commit ec0ae30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ def predict(self, predict_data_lines):
599599
predicted_strings = [[self.index_to_target[sugg] for sugg in timestep]
600600
for timestep in predicted_indices] # (target_length, top-k)
601601
predicted_strings = list(map(list, zip(*predicted_strings))) # (top-k, target_length)
602-
top_scores = [np.exp(np.sum(s, 0)) for s in top_scores]
602+
top_scores = [np.exp(np.sum(s)) for s in zip(*top_scores)]
603603
else:
604604
predicted_strings = [self.index_to_target[idx]
605605
for idx in predicted_indices] # (batch, target_length)

0 commit comments

Comments
 (0)