Skip to content

Commit 9bf31d0

Browse files
author
acadev
committed
updated p3b2 with data downloads
1 parent f9992aa commit 9bf31d0

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Pilot3/P3B2/data.pkl.tgz

-7.43 MB
Binary file not shown.

Pilot3/P3B2/keras_p3b2_baseline.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,28 @@ def char_rnn(
271271
else:
272272
verbose = 0
273273

274+
## Read files
275+
file_path = os.path.dirname(os.path.realpath(__file__))
276+
print file_path
277+
lib_path = os.path.abspath(os.path.join(file_path, '..', '..', 'common'))
278+
sys.path.append(lib_path)
279+
280+
from data_utils import get_file
281+
origin = 'http://ftp.mcs.anl.gov/pub/candle/public/benchmarks/P3B2/P3B2_data.tgz'
282+
data_loc = get_file('P3B2_data.tgz', origin, untar=True, md5_hash=None, cache_subdir='P3B2')
283+
284+
print 'Data downloaded and stored at: ' + data_loc
285+
data_path = os.path.dirname(data_loc)
286+
print data_path
287+
274288
char_rnn(
275289
rnn_size= args.rnn_size,
276290
n_layers= args.n_layers,
277291
learning_rate= args.learning_rate,
278292
dropout= args.dropout,
279293
recurrent_dropout= args.recurrent_dropout,
280294
n_epochs= args.n_epochs,
281-
data_train= args.train_data,
295+
data_train= data_path+'/data.pkl',
282296
verbose= args.verbose,
283297
savedir= args.output_dir,
284298
do_sample= args.do_sample,

0 commit comments

Comments
 (0)