From 81878f6ce319a4e8c88059d22ea2a52efe9d4321 Mon Sep 17 00:00:00 2001 From: gear Date: Tue, 28 Jan 2020 14:37:22 +0900 Subject: [PATCH] better path compatibility with notebooks --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index 7e56c16..a778ac6 100644 --- a/utils.py +++ b/utils.py @@ -11,7 +11,7 @@ from time import perf_counter from torch.utils import data -dataf = os.path.expanduser("./data/") +dataf = os.path.expanduser("{}/data/".format(os.path.dirname(__file__))) def parse_index_file(filename): """Parse index file."""