# Improve performances of a convolutional neural network

I am doing image classificaition, and to do this I have built the following neural network:

def Network(input_shape, num_classes, regl2 = 0.0001, lr=0.0001):

model = Sequential()

# C1 Convolutional Layer
# Pooling
# Batch Normalisation before passing it to the next layer

# C2 Convolutional Layer
# Pooling
# Batch Normalisation

# C3 Convolutional Layer
# Batch Normalisation

# C4 Convolutional Layer
# Batch Normalisation

# C5 Convolutional Layer
# Pooling
# Batch Normalisation

# C6 Convolutional Layer
# Pooling
# Batch Normalisation

# C7 Convolutional Layer
# Pooling
# Batch Normalisation

# Flatten

flatten_shape = (input_shape[0]*input_shape[1]*input_shape[2],)

# D1 Dense Layer
# Dropout
# Batch Normalisation

# D2 Dense Layer
# Dropout
# Batch Normalisation

# D3 Dense Layer
# Dropout
# Batch Normalisation

# Output Layer

# Compile

return model

# create the model
model = Network(input_shape,num_classes)
model.summary()


it works good enough, but I would like to increase its performances.

How could I modify it to do so?

I was thinking about adding layers, which should give better performances, but I haven' t understand well if I should add convolutional layers or dense layers. Moreover I would like to find other ways to increase accuracy than simply adding layers.

[EDIT] I am considering a training set of 1200 images, which represent 4 wheater conditions : Haze, Rainy, Snowy, Sunny.

With my model, the Test accuracy is 0.797500, and the Test loss is 1.881952.

I would like to increase more my accuracy, but I don' t have other ideas than adding convolutional layers. I could try to change the size of the kernels and other hyperparameters, but I have other ideas.

• It might help if you also share some details of your dataset - number of images you are using in particular. If it is not large enough, adding more layers may not always mean better results. Also, it is not very clear what you mean by "works well enough". What is training/validation performance like? A quantitative description is always better. And finally if your sole purpose is to do image recognition, make sure you look into "transfer learning" before building a model from scratch. – serali Dec 2 '19 at 16:56
• Thanks for answering. I have edited the question with more details. Regarding transfer learning, I would like to learn building a CNN which performs well also when created by scratch. Thanks again. – J.D. Dec 2 '19 at 17:22