From 5dd6f25ad24d57e76d2e5b6228ca875fe2948491 Mon Sep 17 00:00:00 2001 From: EddyDavies <38349974+EddyDavies@users.noreply.github.com> Date: Mon, 6 Apr 2020 23:48:28 +0100 Subject: [PATCH] Stopped h5py producing deprecation warning --- pytorch/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch/data.py b/pytorch/data.py index d1e186e..24ffac4 100644 --- a/pytorch/data.py +++ b/pytorch/data.py @@ -36,7 +36,7 @@ def load_data(partition): all_data = [] all_label = [] for h5_name in glob.glob(os.path.join(DATA_DIR, 'modelnet40_ply_hdf5_2048', 'ply_data_%s*.h5'%partition)): - f = h5py.File(h5_name) + f = h5py.File(h5_name, 'r') data = f['data'][:].astype('float32') label = f['label'][:].astype('int64') f.close()