title: How to increase accuracy in Convolutional neural network
body: <p>I am implementing flower recognition - the dataset has few types of flowers.
  Totally the dataset contains about 4000 images</p>
  
  <p>My code - </p>
  
  <pre><code>model = Sequential()
  
  model.add(Conv2D(32, (3, 3), padding='same', input_shape=(32, 32, 3), activation="relu"))
  model.add(Conv2D(32, (3, 3), activation="relu"))
  model.add(MaxPooling2D(pool_size=(2, 2)))
  model.add(Dropout(0.5))
  
  model.add(Conv2D(64, (3, 3), padding='same', activation="relu"))
  model.add(Conv2D(64, (3, 3), activation="relu"))
  model.add(MaxPooling2D(pool_size=(2, 2)))
  model.add(Dropout(0.25))
  
  model.add(Flatten())
  model.add(Dense(512, activation="relu"))
  model.add(Dropout(0.5))
  model.add(Dense(5, activation="softmax"))
  
  model.compile(loss='categorical_crossentropy',optimizer='adam',metrics=['accuracy'])
  history=model.fit(x_train,y_train,batch_size=64,epochs=7,validation_data=(x_test, y_test),shuffle=True)
  </code></pre>
  
  <p>From this, I get the accuracy and loss</p>
  
  <p><a href="https://i.stack.imgur.com/GiaWj.png" rel="nofollow noreferrer">Accuracy scale</a></p>
  
  <p><a href="https://i.stack.imgur.com/Z56zw.png" rel="nofollow noreferrer">Loss scale</a></p>
  
  <p>Then, I need more accuracy. So, I just increase the epochs=30 and the results are</p>
  
  <p>(FOR epochs = 30)</p>
  
  <p><a href="https://i.stack.imgur.com/vVtpc.png" rel="nofollow noreferrer">Accuracy scale </a></p>
  
  <p><a href="https://i.stack.imgur.com/YVhfl.png" rel="nofollow noreferrer">Loss scale </a></p>
  
  <p>I understand that neural network set random weights so that we get different results. But how can I improve the accuracy. I am new to neural nets. Would greatly appreciate some explanation. Thank you</p>