On my Keras(1.2.2), I tried to run code with a function Input,
inputs = keras.Input(shape=(img_size[0], img_size[1], 1))
But the following error returned
AttributeError: module 'keras' has no attribute 'Input'
Can someone help me?
On my Keras(1.2.2), I tried to run code with a function Input,
inputs = keras.Input(shape=(img_size[0], img_size[1], 1))
But the following error returned
AttributeError: module 'keras' has no attribute 'Input'
Can someone help me?
Use keras.layers.Input. All layers are under the submodule keras.layers. Like:
inputs = keras.layers.Input(shape=(img_size[0], img_size[1], 1))
Another common thing to do is to say
from keras.layers import Input
This way later in your code it doesn't get too messy when you try to add a bunch of layers to your model:
inputs = Input(shape=(img_size[0], img_size[1], 1))
tf.kerasinstalled with Tensorflow, or the separatekeraspackage? (tf.keras.Inputwould work)keraspackage