close

How to import keras.engine.topology in Tensorflow?

Hello Guys, How are you all? Hope You all Are Fine. Today We Are Going To learn about How to import keras.engine.topology in Tensorflow in Python. So Here I am Explain to you all the possible Methods here.

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

Table of Contents

How to import keras.engine.topology in Tensorflow?

  1. How to import keras.engine.topology in Tensorflow?

    In order to import keras.engine you may try using:
    import tensorflow.python.keras.engine
    Note: But from tensorflow.python.keras.engine you cannot import topology

  2. import keras.engine.topology in Tensorflow

    In order to import keras.engine you may try using:
    import tensorflow.python.keras.engine
    Note: But from tensorflow.python.keras.engine you cannot import topology

Method 1

You can import Layer and InputSpec from TensorFlow as follows:

from tensorflow.python.keras.layers import Layer, InputSpec

UPDATE: 30/10/2019

from tensorflow.keras.layers import Layer, InputSpec

Method 2

In order to import keras.engine you may try using:

import tensorflow.python.keras.engine

Note: But from tensorflow.python.keras.engine you cannot import topology

Summery

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

Also, Read