Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
Fix mnist-keras multi trials on same system data load (#2228)
Browse files Browse the repository at this point in the history
  • Loading branch information
chicm-ms authored Mar 25, 2020
1 parent 39f211c commit 4e2c0aa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/trials/mnist-keras/mnist-keras.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def load_mnist_data(args):
'''
Load MNIST dataset
'''
(x_train, y_train), (x_test, y_test) = mnist.load_data()
mnist_path = os.path.join(os.environ.get('NNI_OUTPUT_DIR'), 'mnist.npz')
(x_train, y_train), (x_test, y_test) = mnist.load_data(path=mnist_path)
os.remove(mnist_path)

x_train = (np.expand_dims(x_train, -1).astype(np.float) / 255.)[:args.num_train]
x_test = (np.expand_dims(x_test, -1).astype(np.float) / 255.)[:args.num_test]
Expand Down

0 comments on commit 4e2c0aa

Please sign in to comment.