Skip to content

Commit

Permalink
Merge pull request #358 from mindspore-lab/revert-347-v0.4.0
Browse files Browse the repository at this point in the history
Revert "fix yolov7's MaxPool2d bug"
  • Loading branch information
CaitinZhao authored Sep 24, 2024
2 parents bc1a660 + 6a08fbc commit a347c04
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
7 changes: 0 additions & 7 deletions demo/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,10 @@ def get_parser_infer(parents=None):

return parser

def is_yolov7(args):
if "yolov7" not in args.config:
pass
else:
ms.set_context(ascend_config={"precision_mode":"allow_fp32_to_fp16"})

def set_default_infer(args):
# Set Context
ms.set_context(mode=args.ms_mode, device_target=args.device_target, max_call_depth=2000)
# MaxPool2d does not support dtype=fp32, ops's bug. Needed to be updated when ops's demand is done.
is_yolov7(args)
if args.ms_mode == 0:
ms.set_context(jit_config={"jit_level": "O2"})
if args.device_target == "Ascend":
Expand Down
7 changes: 0 additions & 7 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,10 @@ def get_parser_test(parents=None):
)
return parser

def is_yolov7(args):
if "yolov7" not in args.config:
pass
else:
ms.set_context(ascend_config={"precision_mode":"allow_fp32_to_fp16"})

def set_default_test(args):
# Set Context
ms.set_context(mode=args.ms_mode, device_target=args.device_target, max_call_depth=2000)
# MaxPool2d does not support dtype=fp32, ops's bug. Needed to be updated when ops's demand is done.
is_yolov7(args)
if args.ms_mode == 0:
ms.set_context(jit_config={"jit_level": "O2"})
if args.device_target == "Ascend":
Expand Down

0 comments on commit a347c04

Please sign in to comment.