1
Currently I study about neural networks in Keras and I can not understand how it mounts the basic structure of the network, how I am in high school gets very difficult I learn advanced without any training in the area.
I understand a little about the theory of convolutional networks, what I can’t do is the structure, or the model suffers "overfitting" or "underfitting".
Below is one of the networks I tried to make (she is suffering underfitting)
NOTE: Images used with dimensions of 64x64
model = keras.models.Sequential()
model.add(keras.layers.Conv2D(filters=32, kernel_size=3, padding="same", activation="relu", input_shape=(64,64,3)))
model.add(keras.layers.Conv2D(filters=32, kernel_size=3, padding="same", activation="relu"))
model.add(keras.layers.MaxPool2D(pool_size=2, strides=2, padding='valid'))
model.add(keras.layers.Conv2D(filters=64, kernel_size=3, padding="same", activation="relu"))
model.add(keras.layers.Conv2D(filters=64, kernel_size=3, padding="same", activation="relu"))
model.add(keras.layers.MaxPool2D(pool_size=2, strides=2, padding='valid'))
#pool_size = quadrado q ira somar # Strides = pulo
model.add(keras.layers.Flatten())
model.add(keras.layers.Dense(units=128, activation='relu'))
model.add(keras.layers.Dropout(0.2))
model.add(keras.layers.Dense(units=128, activation='relu'))
model.add(keras.layers.Dropout(0.2))
model.add(keras.layers.Dense(units = num_classes, activation = 'softmax'))