From 98110393ccf5d99554c802616890e3782f98cea4 Mon Sep 17 00:00:00 2001 From: Ahmet Anbar Date: Thu, 1 Aug 2019 14:01:49 +0300 Subject: [PATCH] Set allow_pickle as `True` According to change at https://github.com/numpy/numpy/pull/13359/commits/8cea82a54a36b2232b484c7a50a32cefcb85e6bf, the default value allow_pickle is changed as `False`. So, to overcome the problem for new versions of numpy, it is needed to set as `True` when calling the `load` function. --- mnist-cnn/training/mnist-cnn.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mnist-cnn/training/mnist-cnn.py b/mnist-cnn/training/mnist-cnn.py index 7ff71d5..21b29bf 100644 --- a/mnist-cnn/training/mnist-cnn.py +++ b/mnist-cnn/training/mnist-cnn.py @@ -156,7 +156,7 @@ def run_test(weights_file, test_file): output_names = ['prob'] output_names.extend(monitor_names) - param_dict = np.load(weights_file, encoding='latin1').item() + param_dict = np.load(weights_file, encoding='latin1', allow_pickle=True).item() predictor = OfflinePredictor(PredictConfig( model=Model(), session_init=DictRestore(param_dict),