Skip to content

Commit ea17f0c

Browse files
committed
Add file_path
1 parent 0e27ff8 commit ea17f0c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Pilot2/P2B1/p2b1_baseline_keras2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
import sys,os
66
import glob
77
import optparse
8-
lib_path = os.path.abspath(os.path.join('..', '..', 'common'))
8+
file_path = os.path.dirname(os.path.realpath(__file__))
9+
lib_path = os.path.abspath(os.path.join(file_path, '..','..', 'common'))
910
sys.path.append(lib_path)
1011
from data_utils import get_file
1112
HOME=os.environ['HOME']
@@ -37,7 +38,6 @@ def str2bool(v):
3738
import p2b1 as hf
3839
reload(hf)
3940

40-
file_path = os.path.dirname(os.path.realpath(__file__))
4141
lib_path = os.path.abspath(os.path.join(file_path, '..', 'common'))
4242
sys.path.append(lib_path)
4343

Pilot2/P2B2/p2b2_baseline_keras2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
matplotlib.use('TKAgg')
1111
import pylab as py
1212
py.ion()
13-
lib_path = os.path.abspath(os.path.join('..', '..', 'common'))
13+
file_path = os.path.dirname(os.path.realpath(__file__))
14+
lib_path = os.path.abspath(os.path.join(file_path, '..','..', 'common'))
1415
sys.path.append(lib_path)
1516
from data_utils import get_file
1617
HOME=os.environ['HOME']
@@ -51,10 +52,9 @@ def str2bool(v):
5152
import p2b2 as hf
5253
reload(hf)
5354

54-
file_path = os.path.dirname(os.path.realpath(__file__))
5555
lib_path = os.path.abspath(os.path.join(file_path, '..', 'common'))
5656
sys.path.append(lib_path)
57-
57+
5858
import pilot2_datasets as p2
5959
reload(p2)
6060
maps=hf.autoencoder_preprocess()

0 commit comments

Comments
 (0)