Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mindocr/models/backbones/yolov8_backbone.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import numpy as np

import mindspore as ms
Expand Down Expand Up @@ -119,7 +120,7 @@ def yolov8_backbone(

def test_yolo_backbone():
ms.set_context(mode=ms.PYNATIVE_MODE)
ms.set_device("Ascend", 3)
ms.set_device("Ascend", os.environ.get("DEVICE_ID", 0))
ms.set_seed(0)

network = YOLOv8Backbone()
Expand Down
3 changes: 2 additions & 1 deletion mindocr/models/heads/yolov8_head.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import math
import os

import numpy as np

Expand Down Expand Up @@ -125,7 +126,7 @@ def yolov8_head(nc=5, reg_max=16, stride=None, in_channels=None) -> YOLOv8Head:

def test_yolov8_head():
ms.set_context(mode=ms.PYNATIVE_MODE)
ms.set_device("Ascend", 3)
ms.set_device("Ascend", os.environ.get("DEVICE_ID", 0))
ms.set_seed(0)

network = yolov8_head()
Expand Down
Loading