title: Deep learning model is training on very less data
body: <p>I'm training a deep learning model on 100000 rows with 80% of the training data and 20% of test data. The data is splitting however my model is showing the output of training with 2242. Below is the training code with model and output given. Any help will be highly appreciated.</p>
  <p>Training Code:</p>
  <pre><code>import time
  start_time = time.time()
  
  from sklearn.feature_extraction.text import TfidfVectorizer
  
  tweet_table = cleaning_table(tweet_table)
  
  def tokenization_tweets(dataset, features):
      tokenization = TfidfVectorizer(max_features=features)
      tokenization.fit(dataset)
      dataset_transformed = tokenization.transform(dataset).toarray()
      return dataset_transformed
      
   
  def splitting(table):
      X_train, X_test, y_train, y_test = train_test_split(table.tweet, table.test, test_size=0.2, shuffle=True)
      return X_train, X_test, y_train, y_test
  
  if __name__ == &quot;__main__&quot;:
      tweet_table['test'] = tweet_table['Overall_Sentiment'].apply(lambda x: 1 if x == 'Positive' else (0 if x == 'Negative' else 2))
  
  
  if __name__ == &quot;__main__&quot;:
      X_train, X_test, y_train, y_test = splitting(tweet_table)
  
  #print(tweet_table[&quot;test&quot;].value_counts())
  #print(tweet_table[&quot;Overall_Sentiment&quot;].value_counts())
  #print(list(set(y_train)))
  #print(list(set(y_test)))
  
  
  #Create a Neural Network
  #Create the model
  def train(X_train_mod, y_train, features, shuffle, drop, layer1, layer2, epoch, lr, epsilon, validation):
      model_nn = Sequential()
      model_nn.add(Dense(layer1, input_shape=(features,), activation='relu'))
      model_nn.add(Dropout(drop))
      model_nn.add(Dense(layer2, activation='sigmoid'))
      model_nn.add(Dropout(drop))
      model_nn.add(Dense(3, activation='softmax'))
      
      optimizer = keras.optimizers.Adam(lr=lr, beta_1=0.9, beta_2=0.999, epsilon=epsilon, decay=0.0, amsgrad=False)
      model_nn.compile(loss='sparse_categorical_crossentropy',
                   optimizer=optimizer,
                   metrics=['accuracy'])
      model_nn.fit(np.array(X_train_mod), y_train,
                   batch_size=32,
                   epochs=epoch,
                   verbose=1,
                   validation_split=validation,
                   shuffle=shuffle)
      return model_nn
  
  
  def test(X_test, model_nn):
      prediction = model_nn.predict(X_test)
      return prediction
  
  
  def model1(X_train, y_train):   
      features = 3500
      shuffle = True
      drop = 0.5
      layer1 = 512
      layer2 = 256
      epoch = 5
      lr = 0.001
      epsilon = None
      validation = 0.1
      X_train_mod = tokenization_tweets(X_train, features)
      model = train(X_train_mod, y_train, features, shuffle, drop, layer1, layer2, epoch, lr, epsilon, validation)
      return model;
  
  #model1(X_train, y_train)
  
  #model11(X_train, y_train)
  
  def save_model(model):
          # lets assume `model` is main model 
          model_json = model.to_json()
          with open(&quot;model.json&quot;, &quot;w&quot;) as json_file:
              json.dump(model_json, json_file)
  
          model.save_weights(&quot;model_weights.h5&quot;)
  
  #print(len(X_train))
  #print(len(y_train))
  model_final = model1(X_train, y_train)
  </code></pre>
  <p>Output:</p>
  <pre><code>Epoch 1/5
  2242/2242 [==============================] - 6s 3ms/step - loss: 0.3426 - accuracy: 0.8476 - val_loss: 0.2690 - val_accuracy: 0.8857
  Epoch 2/5
  2242/2242 [==============================] - 6s 3ms/step - loss: 0.2399 - accuracy: 0.9015 - val_loss: 0.2471 - val_accuracy: 0.8991
  Epoch 3/5
  2242/2242 [==============================] - 6s 3ms/step - loss: 0.1912 - accuracy: 0.9205 - val_loss: 0.2447 - val_accuracy: 0.9028
  Epoch 4/5
  2242/2242 [==============================] - 6s 3ms/step - loss: 0.1454 - accuracy: 0.9399 - val_loss: 0.2547 - val_accuracy: 0.9083
  Epoch 5/5
  2242/2242 [==============================] - 6s 3ms/step - loss: 0.1046 - accuracy: 0.9552 - val_loss: 0.2874 - val_accuracy: 0.9084
  --- 192.1562056541443 seconds ---
  </code></pre>
  <p>Many Thanks</p>