Skip to content

Commit

Permalink
silence terrible pylint suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
altanh committed Jun 30, 2021
1 parent 8d8fdc1 commit 08b504e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tvm/topi/nn/softmax.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ def log_softmax(x, axis=-1):
output : tvm.te.Tensor
2-D output with same shape
"""

assert len(x.shape) == 2, "only support 2-dim log softmax"
assert axis == 1 or axis == len(x.shape) - 1, "only support last axis log softmax"
# pylint: disable=R1714
assert axis == -1 or axis == len(x.shape) - 1, "only support last axis log softmax"
m, n = x.shape
k = te.reduce_axis((0, n), name="k")
max_elem = te.compute((m,), lambda i: tvm.te.max(x[i, k], axis=k))
Expand Down

0 comments on commit 08b504e

Please sign in to comment.