The following code
from tensorflow import keras
from keras.layers import Conv2D
model = keras.Sequential()
model.add(Conv2D(1, (3, 3), padding=\'same\', input_s
Try this:
from tensorflow import keras
from tensorflow.keras.layers import Conv2D
model = keras.Sequential()
model.add(Conv2D(1, (3, 3), padding='same', input_shape=(28, 28, 1)))
You are mixing a tf.keras Sequential model with a keras Conv2D layer (instead of a tf.keras Conv2D layer.)
Or, as remarked below, use actual Keras:
import keras
from keras.models import Sequential
from keras.layers import Conv2D
model = Sequential()
model.add(Conv2D(1, (3, 3), padding='same', input_shape=(28, 28, 1)))
You should import Sequential from keras models
from keras.models import Sequential
from keras.layers import Conv2D
model = Sequential()
model.add(Conv2D(1, (3, 3), padding='same', input_shape=(28, 28, 1)))