Skip to content

Commit

Permalink
Fix minor error-handling bug (tensorflow#8468)
Browse files Browse the repository at this point in the history
  • Loading branch information
critiqjo authored and jhseu committed Mar 16, 2017
1 parent f2ec1f0 commit f8d1f5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorflow/contrib/seq2seq/python/ops/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def sample(self, time, outputs, state, name=None):
# Outputs are logits, use argmax to get the most probable id
if not isinstance(outputs, ops.Tensor):
raise TypeError("Expected outputs to be a single Tensor, got: %s" %
outputs)
type(outputs))
sample_ids = math_ops.cast(
math_ops.argmax(outputs, axis=-1), dtypes.int32)
return sample_ids
Expand Down

0 comments on commit f8d1f5b

Please sign in to comment.