title: Error in LSTM during testing
body: <p>My data is of 68871 x 43, where the features are in the column no. 1-42 and label in column no. 43</p>
  
  <p>My keras LSTM code for classification of the data is </p>
  
  <pre><code>import numpy
  import matplotlib.pyplot as plt
  import pandas
  import math
  from keras.models import Sequential
  from keras.layers import Dense
  from keras.layers import LSTM
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.metrics import mean_squared_error
  # convert an array of values into a dataset matrix
  def create_dataset(dataset, look_back=1):
      dataX, dataY = [], []
      for i in range(len(dataset)-look_back-1):
          a = dataset[i:(i+look_back), 0]
          #if i==0
          # print len(a)
          dataX.append(a)
          dataY.append(dataset[i + look_back, 43])
      return numpy.array(dataX), numpy.array(dataY)
  # fix random seed for reproducibility
  numpy.random.seed(7)
  # load the dataset
  #dataframe = pandas.read_csv('international-airline-passengers.csv', usecols=[1], engine='python', skipfooter=3)
  dataset = numpy.loadtxt("Source.txt", delimiter=" ")
  #dataset = dataframe.values
  #dataset = dataset.astype('float32')
  # normalize the dataset
  scaler = MinMaxScaler(feature_range=(0, 1))
  dataset = scaler.fit_transform(dataset)
  # split into train and test sets
  train_size = int(len(dataset) * 0.67)
  test_size = len(dataset) - train_size
  train, test = dataset[0:train_size,:], dataset[train_size:len(dataset),:]
  # reshape into X=t and Y=t+1
  look_back = 1
  trainX, trainY = create_dataset(train, look_back)
  testX, testY = create_dataset(test, look_back)
  # reshape input to be [samples, time steps, features]
  trainX = numpy.reshape(trainX, (trainX.shape[0], 1, trainX.shape[1]))
  testX = numpy.reshape(testX, (testX.shape[0], 1, testX.shape[1]))
  # create and fit the LSTM network
  model = Sequential()
  model.add(LSTM(3, input_dim=look_back))
  model.add(Dense(1))
  model.compile(loss='mean_squared_error', optimizer='adam')
  model.fit(trainX, trainY, nb_epoch=1, batch_size=1)
  score, acc = model.evaluate(testX, testY)
  print('Test score:', score)
  print('Test accuracy:', acc)
  </code></pre>
  
  <p>I am getting this error during testing time <a href="https://i.stack.imgur.com/VjSUG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VjSUG.png" alt="enter image description here"></a></p>
  
  <p>Please help resolve this, many thanks in advance</p>