diff --git a/vgg16.py b/vgg16.py index 5792ce5..1b5a21b 100644 --- a/vgg16.py +++ b/vgg16.py @@ -17,7 +17,7 @@ def __init__(self, vgg16_npy_path=None): vgg16_npy_path = path print(path) - self.data_dict = np.load(vgg16_npy_path, encoding='latin1').item() + self.data_dict = np.load(vgg16_npy_path, encoding='latin1', allow_pickle=True).item() print("npy file loaded") def build(self, rgb): diff --git a/vgg19.py b/vgg19.py index 1fb0d44..0f78183 100644 --- a/vgg19.py +++ b/vgg19.py @@ -17,7 +17,7 @@ def __init__(self, vgg19_npy_path=None): vgg19_npy_path = path print(vgg19_npy_path) - self.data_dict = np.load(vgg19_npy_path, encoding='latin1').item() + self.data_dict = np.load(vgg19_npy_path, encoding='latin1', allow_pickle=True).item() print("npy file loaded") def build(self, rgb): diff --git a/vgg19_trainable.py b/vgg19_trainable.py index bf7ed02..3bf6c76 100644 --- a/vgg19_trainable.py +++ b/vgg19_trainable.py @@ -13,7 +13,7 @@ class Vgg19: def __init__(self, vgg19_npy_path=None, trainable=True, dropout=0.5): if vgg19_npy_path is not None: - self.data_dict = np.load(vgg19_npy_path, encoding='latin1').item() + self.data_dict = np.load(vgg19_npy_path, encoding='latin1', allow_pickle=True).item() else: self.data_dict = None