mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[1/N] Fix ruff warnings (#164333)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/164333 Approved by: https://github.com/albanD
This commit is contained in:
committed by
PyTorch MergeBot
parent
e419dc6d08
commit
f7ab8a2710
@ -270,8 +270,6 @@ def _set_shape_type(
|
||||
elif isinstance(meta_val, (float, torch.SymFloat)):
|
||||
value.dtype = ir.DataType.FLOAT
|
||||
value.shape = ir.Shape([])
|
||||
else:
|
||||
pass
|
||||
|
||||
|
||||
def _get_qualified_module_name(cls: Any) -> str:
|
||||
|
@ -1365,8 +1365,7 @@ def get_pool_ceil_padding(input, kernel_size, stride, padding):
|
||||
"get_pool_ceil_padding", "input size not accessible", input
|
||||
)
|
||||
ceiled_output_dim = [
|
||||
int(math.ceil((dim[i] + 2 * padding[i] - kernel_size[i]) / float(stride[i])))
|
||||
+ 1
|
||||
math.ceil((dim[i] + 2 * padding[i] - kernel_size[i]) / float(stride[i])) + 1
|
||||
for i in range(0, len(padding))
|
||||
]
|
||||
# ensure last pooling starts inside
|
||||
@ -4536,7 +4535,7 @@ def lstm_cell(g: jit_utils.GraphContext, self, hidden, w_ih, w_hh, b_ih, b_hh):
|
||||
weight = (
|
||||
(w_ih, w_hh, b_ih, b_hh) if symbolic_helper._is_tensor(b_ih) else (w_ih, w_hh)
|
||||
)
|
||||
has_biases = True if symbolic_helper._is_tensor(b_ih) else False
|
||||
has_biases = bool(symbolic_helper._is_tensor(b_ih))
|
||||
_, h_outs, c_outs = _generic_rnn(
|
||||
g,
|
||||
"LSTM",
|
||||
|
Reference in New Issue
Block a user