Skip to content

Commit ffca75a

Browse files
committed
Don't make the path of data files depend of the current directory.
1 parent 3d1a0f9 commit ffca75a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

code/rnnrbm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# More information at http://deeplearning.net/tutorial/rnnrbm.html
55

66
import glob
7+
import os
78
import sys
89

910
import numpy
@@ -269,7 +270,9 @@ def generate(self, filename, show=True):
269270

270271
def test_rnnrbm(batch_size=100, num_epochs=200):
271272
model = RnnRbm()
272-
model.train(glob.glob('../data/Nottingham/train/*.mid'),
273+
re = os.path.join(os.path.split(os.path.dirname(__file__))[0],
274+
'data', 'Nottingham', 'train', '*.mid')
275+
model.train(glob.glob(re),
273276
batch_size=batch_size, num_epochs=num_epochs)
274277
return model
275278

0 commit comments

Comments
 (0)