From 4694c3710e2fb71c05e9c878ce58b2f491909cc0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 20 Oct 2021 17:05:14 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- yolort/utils/update_module_state.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yolort/utils/update_module_state.py b/yolort/utils/update_module_state.py index ca94882d5..9a9ea1ea5 100644 --- a/yolort/utils/update_module_state.py +++ b/yolort/utils/update_module_state.py @@ -31,9 +31,9 @@ def load_from_ultralytics(checkpoint_path: str, version: str = "r6.0"): strides = checkpoint_yolov5.stride anchor_grids = checkpoint_yolov5.yaml["anchors"] if isinstance(anchor_grids, int): - anchor_grids = to_numpy( - checkpoint_yolov5.model[-1].anchor_grid - ).reshape(3, -1).tolist() + anchor_grids = ( + to_numpy(checkpoint_yolov5.model[-1].anchor_grid).reshape(3, -1).tolist() + ) depth_multiple = checkpoint_yolov5.yaml["depth_multiple"] width_multiple = checkpoint_yolov5.yaml["width_multiple"]