close

[solved] ValueError: Unknown layer: Functional

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ValueError: Unknown layer: Functional in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ValueError: Unknown layer: Functional Error Occurs?

Today I get the following error ValueError: Unknown layer: Functional in Python.

How To Solve ValueError: Unknown layer: Functional Error ?

  1. How To Solve ValueError: Unknown layer: Functional Error ?

    To Solve ValueError: Unknown layer: Functional Error I had the same issue when i was on tf 2.3.0, i downgraded to tf 2.2.0 and it worked

Solution 1

The solution to this error is very simple, ex. the reason is that you have trained the model on version ‘2.3.0’ of Tensorflow & ‘2.4.3’ of Keras (On Colab or local). and now you are accessing the saved model(.h5) via another version of Keras & TensorFlow. It will give you the error. The solution is that re-trained model with upgraded versions or downgrades your TF&Keras to the same version as on which model is trained.

Solution 2

I had the same issue when i was on tf 2.3.0, i downgraded to tf 2.2.0 and it worked

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment