Skip to content

Commit

Permalink
Fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinthesun committed Sep 11, 2020
1 parent ac009ab commit 6847dfa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions python/tvm/relay/frontend/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ def _impl(inputs, input_types):
if isinstance(dim, tvm.tir.Any):
end = _op.shape_of(data)
break
else:
end.append(int(dim))
end.append(int(dim))

begin = [0] * ndim
dim = int(inputs[1])
Expand Down Expand Up @@ -355,8 +354,8 @@ def _impl(inputs, input_types):
end[dim] = target_end
else:
all_static = True
for i in range(len(dshape)):
if i != dim and isinstance(dshape[i], tvm.tir.Any):
for i, shape_dim in enumerate(dshape):
if i != dim and isinstance(shape_dim, tvm.tir.Any):
all_static = False

if all_static:
Expand Down Expand Up @@ -1132,7 +1131,7 @@ def _impl(inputs, input_types):
new_shape.append(0)
out = _op.reshape(data, new_shape)
if squeeze_axes:
out = _op.squeeze(out, axis=squeeze_axes)
out = _op.squeeze(out, axis=squeeze_axes)
return out
return _impl

Expand Down Expand Up @@ -2942,7 +2941,8 @@ def get_var(name, val):
# of the eariler loop into loop variables of the next loop.
# So the variable corresponding to the first loop output appears free in the second loop body.
free_vars = [var for var in _get_free_vars_from_block(body_block)
if var in outputs and not isinstance(outputs[var], (_expr.Constant, int, float, str))
if var in outputs and
not isinstance(outputs[var], (_expr.Constant, int, float, str))
and outputs[var]]

prev_outputs = {}
Expand Down

0 comments on commit 6847dfa

Please sign in to comment.