glenn-jocher
commited on
Commit
•
fb982d6
1
Parent(s):
c1bed60
Fix relative `ROOT` Pytorch Hub custom model bug (#4974)
Browse files* Fix relative `ROOT` Pytorch Hub custom model bug
* Update yolo.py
- models/tf.py +1 -1
- models/yolo.py +1 -1
models/tf.py
CHANGED
@@ -20,7 +20,7 @@ FILE = Path(__file__).resolve()
|
|
20 |
ROOT = FILE.parents[1] # YOLOv5 root directory
|
21 |
if str(ROOT) not in sys.path:
|
22 |
sys.path.append(str(ROOT)) # add ROOT to PATH
|
23 |
-
ROOT = ROOT.relative_to(Path.cwd()) # relative
|
24 |
|
25 |
import numpy as np
|
26 |
import tensorflow as tf
|
|
|
20 |
ROOT = FILE.parents[1] # YOLOv5 root directory
|
21 |
if str(ROOT) not in sys.path:
|
22 |
sys.path.append(str(ROOT)) # add ROOT to PATH
|
23 |
+
# ROOT = ROOT.relative_to(Path.cwd()) # relative
|
24 |
|
25 |
import numpy as np
|
26 |
import tensorflow as tf
|
models/yolo.py
CHANGED
@@ -15,7 +15,7 @@ FILE = Path(__file__).resolve()
|
|
15 |
ROOT = FILE.parents[1] # YOLOv5 root directory
|
16 |
if str(ROOT) not in sys.path:
|
17 |
sys.path.append(str(ROOT)) # add ROOT to PATH
|
18 |
-
ROOT = ROOT.relative_to(Path.cwd()) # relative
|
19 |
|
20 |
from models.common import *
|
21 |
from models.experimental import *
|
|
|
15 |
ROOT = FILE.parents[1] # YOLOv5 root directory
|
16 |
if str(ROOT) not in sys.path:
|
17 |
sys.path.append(str(ROOT)) # add ROOT to PATH
|
18 |
+
# ROOT = ROOT.relative_to(Path.cwd()) # relative
|
19 |
|
20 |
from models.common import *
|
21 |
from models.experimental import *
|