Update sys.path.append(str(ROOT)) (#4852)

* Update `sys.path.append(str(ROOT))`

* Cleanup
This commit is contained in:
Glenn Jocher authored and GitHub committed 2021-09-18 15:02:08 +02:00
1 parent 3732f9ac8a
commit 4d1a2ac87e
10 files changed
+30 -32

No files matched your search

+3 -2
View File
@@ -17,8 +17,9 @@ from copy import deepcopy
from pathlib import Path
FILE = Path(__file__).resolve()
ROOT = FILE.parents[1] # yolov5/ dir
sys.path.append(ROOT.as_posix()) # add yolov5/ to path
ROOT = FILE.parents[1] # YOLOv5 root directory
if str(ROOT) not in sys.path:
sys.path.append(str(ROOT)) # add ROOT to PATH
import numpy as np
import tensorflow as tf