I am trying to run a neural network on text inputs. This is a binary classification. Here is my working code so far:

```
df = pd.read_csv(pathname, encoding = "ISO-8859-1")
df = df[['content_cleaned', 'meaningful']] #Content cleaned: text, meaningful: label

X = df['content_cleaned']
y = df['meaningful']
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=21) 

tokenizer = Tokenizer(num_words=100)
tokenizer.fit_on_texts(X_train)
X_train_encoded = tokenizer.texts_to_sequences(X_train)
X_test_encoded = tokenizer.texts_to_sequences(X_test)

max_len = 100
X_train = pad_sequences(X_train_encoded, maxlen=max_len)
X_test = pad_sequences(X_test_encoded, maxlen=max_len)

batch_size = 100
max_words = 100
input_dim = X_train.shape[1]  # Number of features
model = Sequential()
model.add(layers.Dense(10, activation='relu', input_shape=X_train.shape[1:]))

model.add(layers.Dense(1, activation='sigmoid'))

model.compile(loss='categorical_crossentropy',
          optimizer='adam',
          metrics=['accuracy'])

history = model.fit(X_train, X_test,
                batch_size=batch_size,
                epochs=5,
                verbose=1,
                validation_split=0.1)

```

My question is two parts. First is with the `input_shape` when creating the layers. I am confused as to the syntax of declaring this. When running this command:

```
print(X_train.shape)

```

I am getting this shape: `(3609, 100)`.

From my understanding, this is telling me that there are 3609 instances. From viewing other examples, my naive assumption was to use the 100 as there are 100 types (may be understanding this incorrectly) corresponding to the `max_words` that I initialized. I believe that I may have done the syntax incorrectly when initializing the `input_shape`. 

The second question is with an error message when running all of this (most likely with the incorrect `input_shape`). The error message highlights this line of code:

```
 validation_split=0.1)

```

The error message is:

```
ValueError: Error when checking target: expected dense_2 to have shape (None, 1) but got array with shape (1547, 1

```

Am I going about this problem incorrectly? I am very new to Deep Learning.