From 156f0561b52658c1adc33c17c326ebc9074d4e9a Mon Sep 17 00:00:00 2001 From: sergiopaniego Date: Fri, 4 Feb 2022 15:58:45 +0100 Subject: [PATCH] Updated keras brain with new TF version --- behavior_metrics/brains/f1/brain_f1_keras.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/behavior_metrics/brains/f1/brain_f1_keras.py b/behavior_metrics/brains/f1/brain_f1_keras.py index 8c9face8..175adbb6 100644 --- a/behavior_metrics/brains/f1/brain_f1_keras.py +++ b/behavior_metrics/brains/f1/brain_f1_keras.py @@ -9,9 +9,8 @@ """ +import tensorflow as tf import numpy as np - -import keras import cv2 import time import os @@ -57,7 +56,8 @@ def __init__(self, sensors, actuators, model=None, handler=None, config=None): if not path.exists(PRETRAINED_MODELS + model): print("File " + model + " cannot be found in " + PRETRAINED_MODELS) - self.net = keras.models.load_model(PRETRAINED_MODELS + model) + self.net = tf.keras.models.load_model(PRETRAINED_MODELS + model) + print(self.net.summary()) else: print("** Brain not loaded **") print("- Models path: " + PRETRAINED_MODELS)