Build the CNN model
cnn_model = Sequential()
cnn_model.add(Conv2D(32, kernel_size=(2, 2), activation=‘relu’, input_shape=(1, 28, X_train_cnn.shape[30])))
cnn_model.add(MaxPooling2D(pool_size=(2, 2)))
cnn_model.add(Dropout(0.25))
cnn_model.add(Flatten())
cnn_model.add(Dense(128, activation=‘relu’))
cnn_model.add(Dropout(0.5))
cnn_model.add(Dense(1, activation=‘sigmoid’))
error -
2023-04-04 12:17:15.507964: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
IndexError Traceback (most recent call last)
Input In [14], in <cell line: 3>()
1 # Build the CNN model
2 cnn_model = Sequential()
----> 3 cnn_model.add(Conv2D(32, kernel_size=(2, 2), activation=‘relu’, input_shape=(1, 28, X_train_cnn.shape[30])))
4 cnn_model.add(MaxPooling2D(pool_size=(2, 2)))
5 cnn_model.add(Dropout(0.25))
IndexError: tuple index out of range