Skip to content

Commit c355edb

Browse files
authored
[Enhancement] Set Num thread to 0 (#222)
* dumps to 0.5.0 * fix known issue * fix bug * set numThread to 0
1 parent edd4b89 commit c355edb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/train.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os.path as osp
55
import time
66

7+
import cv2
78
import mmcv
89
import torch
910
from mmcv import Config, DictAction
@@ -16,6 +17,8 @@
1617
from mmgen.models import build_model
1718
from mmgen.utils import collect_env, get_root_logger
1819

20+
cv2.setNumThreads(0)
21+
1922

2023
def parse_args():
2124
parser = argparse.ArgumentParser(description='Train a GAN model')

0 commit comments

Comments
 (0)