I'm trying to rewrite a Neural Network model which used to classify satellite images,
I want to use some conv layers in that model,like
#keras.layers.Conv2D(filters=64, kernel_size=(3, 3), activation='relu', padding = 'same',input_shape=(1,nBands)),
but I can't get the input_shape parameter right, can anyone help me?
the previous NN model is this:
# Print the shape of reshaped data
print(xTrain.shape, xTest.shape, featuresHyderabad.shape)
#(2519025, 1, 6) (1679351, 1, 6) (1391808, 1, 6)
# Define the parameters of the model
model = keras.Sequential([
#keras.layers.Conv2D(filters=64, kernel_size=(3, 3), activation='relu', padding = 'same',input_shape=(1,nBands)),
keras.layers.Flatten(input_shape=(1, nBands)),
keras.layers.Dense(128, activation='relu',kernel_initializer='glorot_normal'),
keras.layers.Dense(2, activation='softmax')])
# Define the accuracy metrics and parameters
model.compile(optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"])
# Run the model
model.fit(xTrain, yTrain, epochs=2,batch_size=10)