Skip to content

Commit a5b107d

Browse files
committed
style: un_flatten_grad
1 parent cd8a5d1 commit a5b107d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_optimizer/optimizer/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def un_flatten_grad(grads: torch.Tensor, shapes: List[int]) -> List[torch.Tensor
4848
un_flatten_grads: List[torch.Tensor] = []
4949
for shape in shapes:
5050
length = np.prod(shape)
51-
un_flatten_grads.append(grads[idx : idx + length].view(shape).clone())
51+
un_flatten_grads.append(grads[idx:idx + length].view(shape).clone()) # fmt: skip
5252
idx += length
5353
return un_flatten_grads
5454

0 commit comments

Comments
 (0)