From 0b48222835ced2bda344b189c60d6c82f615896c Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Tue, 28 Sep 2021 06:36:12 -0700 Subject: [PATCH] Fix relative `ROOT` Pytorch Hub custom model bug (#4974) * Fix relative `ROOT` Pytorch Hub custom model bug * Update yolo.py --- models/tf.py | 2 +- models/yolo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/tf.py b/models/tf.py index 4c082cb8a15e..bc6134291aca 100644 --- a/models/tf.py +++ b/models/tf.py @@ -20,7 +20,7 @@ ROOT = FILE.parents[1] # YOLOv5 root directory if str(ROOT) not in sys.path: sys.path.append(str(ROOT)) # add ROOT to PATH -ROOT = ROOT.relative_to(Path.cwd()) # relative +# ROOT = ROOT.relative_to(Path.cwd()) # relative import numpy as np import tensorflow as tf diff --git a/models/yolo.py b/models/yolo.py index b4ec1eda8376..5d19aad5369f 100644 --- a/models/yolo.py +++ b/models/yolo.py @@ -15,7 +15,7 @@ ROOT = FILE.parents[1] # YOLOv5 root directory if str(ROOT) not in sys.path: sys.path.append(str(ROOT)) # add ROOT to PATH -ROOT = ROOT.relative_to(Path.cwd()) # relative +# ROOT = ROOT.relative_to(Path.cwd()) # relative from models.common import * from models.experimental import *