Skip to content

Commit

Permalink
Address ebrevdo
Browse files Browse the repository at this point in the history
  • Loading branch information
drpngx authored Aug 10, 2018
1 parent b2470ca commit dbfa330
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tensorflow/python/ops/nn_grad.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,8 +987,7 @@ def _TopKGrad(op, grad, _):
# Compute linear indices (flattened to 1D).
ind = array_ops.reshape(ind_2d + math_ops.cast(array_ops.expand_dims(
math_ops.range(0, math_ops.cast(outerdim, dtypes.int64)
* in_lastdim, in_lastdim), -1
), dtypes.int32), [-1])
* in_lastdim, in_lastdim), -1), dtypes.int32), [-1])

# Substitute grad to appropriate locations and fill the rest with zeros,
# finally reshaping it to the original input shape.
Expand Down

0 comments on commit dbfa330

Please sign in to comment.