Skip to content

Commit

Permalink
Merge pull request #312 from JdeRobot/issue-311
Browse files Browse the repository at this point in the history
Updated keras brain with new TF version
  • Loading branch information
sergiopaniego authored Feb 4, 2022
2 parents ee35ffa + 156f056 commit 49c3f55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions behavior_metrics/brains/f1/brain_f1_keras.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
"""

import tensorflow as tf
import numpy as np

import keras
import cv2
import time
import os
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 49c3f55

Please sign in to comment.