From 6d3db7d283cfcf3944de3eb90190aff9c3747a06 Mon Sep 17 00:00:00 2001 From: Anup Kumar Date: Thu, 16 Apr 2020 19:10:37 +0200 Subject: [PATCH] Update str --- lib/galaxy/tools/recommendations.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/galaxy/tools/recommendations.py b/lib/galaxy/tools/recommendations.py index 4d8f59aa0c1..533d3fb160b 100644 --- a/lib/galaxy/tools/recommendations.py +++ b/lib/galaxy/tools/recommendations.py @@ -78,8 +78,7 @@ class ToolRecommendations(): # iterate through all the attributes of the model to find weights of neural network layers for item in trained_model.keys(): if "weight_" in item: - key = "weight_{}".format(str(counter_layer_weights)) - weight = trained_model[key][()] + weight = trained_model["weight_" + str(counter_layer_weights)][()] model_weights.append(weight) counter_layer_weights += 1 self.loaded_model = model_from_json(model_config)