<jupyter_start><jupyter_text>make model<jupyter_code>import tensorflow as tf
x_train.shape, x_train[2]
X_train = np.reshape(x_train, (-1, 3, 1))
X_train.shape, X_train[2]
np.unique(y_train)
model = tf.keras.models.Sequential()

model.add(tf.keras.Input(shape=(3, 1)))
model.add(tf.keras.layers.LSTM(128)) # (batch_size, timesteps, input_dim)
model.add(tf.keras.layers.Dense(14, activation='softmax'))

model.compile(optimizer='adam', loss='sparse_categorical_crossentropy', metrics=['accuracy'])
hist = model.fit(X_train, y_train, epochs=500, batch_size=10)
model.evaluate(X_train, y_train)
X_train[0:1]
model.predict(X_train[0:1])
first = 0.61538462
second = 0.07692308
third = 0.53846154
pred = model.predict(X_train[0:1])
np.argmax(pred)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16493506493506493, 'fraction_numerical': 0.06493506493506493, 'mean_word_length': 8.178571428571429, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '350820', 'license': 'Apache-2.0', 'n_tokens_mistral': 351, 'n_tokens_neox': 320, 'n_words': 46, 'path': 'Notescale_LSTM.ipynb', 'repo_name': '00FFEF/test_deeplearning', 'size': '770'}