From ffb1fbc0873a395e7447803ec7ea3d3c267f09a1 Mon Sep 17 00:00:00 2001 From: Patrick Speicher <40468317+PatrickSpeicher@users.noreply.github.com> Date: Tue, 26 Nov 2019 15:55:23 +0100 Subject: [PATCH] Update solution_5_0.py fixed error: 'Object arrays cannot be loaded when allow_pickle=False' --- 5_MalwareInjection/solution_5_0.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/5_MalwareInjection/solution_5_0.py b/5_MalwareInjection/solution_5_0.py index 0609e32..05b3eb3 100644 --- a/5_MalwareInjection/solution_5_0.py +++ b/5_MalwareInjection/solution_5_0.py @@ -14,8 +14,8 @@ latent_dim = 256 # Latent dimensionality of the encoding space. -input_token_index = np.load('./input_tokens.npy').item() -target_token_index = np.load('./target_tokens.npy').item() +input_token_index = np.load('./input_tokens.npy', allow_pickle=True).item() +target_token_index = np.load('./target_tokens.npy', allow_pickle=True).item() num_encoder_tokens = len(input_token_index) num_decoder_tokens = len(target_token_index)