title: How to find the wrong predictions in Keras?
body: <p>I have built a Keras model for extracting information from a raw input of text input. I am getting an accuracy of 0.9869. How can I know which of the training data is making the accuracy go low? I have pasted the code I am using below.</p>
  
  <pre><code>import numpy as np  
  from keras.models import Model, load_model
  from keras.layers import Input, Dense, LSTM, Activation, Bidirectional, Dot, Flatten
  from keras.callbacks import ModelCheckpoint
  
  x_nyha = np.load("data/x_nyha.npy")
  y_nyha = np.load("data/y/y_nyha.npy")
  print(x_nyha.shape)
  print(y_nyha.shape)
  
  
  input_shape = x_nyha.shape[1:3]
  
  X = Input(shape=input_shape)
  A = Bidirectional(LSTM(512, return_sequences=True), merge_mode='concat')(X)
  D = Dense(900, activation='relu')(A)
  E = Dense(1, activation='sigmoid')(D)
  Y = Flatten()(E)
  model = Model(X, Y)
  model.summary()
  
  model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
  
  
  batch_size = 128
  num_epochs = 50
  
  
  model.fit(x_nyha, y_nyha, batch_size=batch_size, epochs=num_epochs, verbose=1)
  </code></pre>