Есть модель,которая была создана для классификации текстов  import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.preprocessing.sequence import pad_sequences

max_len = 600  # максимальная длина последовательности

# создаем токенизатор
tokenizer = Tokenizer()
tokenizer.fit_on_texts(train_df['lemma'])

# преобразуем текст в последовательность чисел
train_sequences = tokenizer.texts_to_sequences(train_df['lemma'])
test_sequences = tokenizer.texts_to_sequences(test_df['lemma'])
val_sequences = tokenizer.texts_to_sequences(val_df['lemma'])

# добавляем паддинг
train_sequences = pad_sequences(train_sequences, maxlen=max_len)
test_sequences = pad_sequences(test_sequences, maxlen=max_len)
val_sequences = pad_sequences(val_sequences, maxlen=max_len)

# создаем модель seq2seq
input_dim = len(tokenizer.word_index) + 1
embedding_dim = 50

model = keras.Sequential([
    layers.Embedding(input_dim=input_dim, output_dim=embedding_dim, input_length=max_len),
    layers.LSTM(units=64, dropout=0.2, recurrent_dropout=0.2),
    layers.Dense(1, activation='sigmoid')
])

model.summary()  # выводим информацию о модели  . from sklearn.metrics import f1_score
import tensorflow.keras.backend as K

import numpy as np

from keras import backend as K

def recall_m(y_true, y_pred):
    true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0, 1)))
    possible_positives = K.sum(K.round(K.clip(y_true, 0, 1)))
    recall = true_positives / (possible_positives + K.epsilon())
    return recall

def precision_m(y_true, y_pred):
    true_positives = K.sum(K.round(K.clip(y_true * y_pred, 0, 1)))
    predicted_positives = K.sum(K.round(K.clip(y_pred, 0, 1)))
    precision = true_positives / (predicted_positives + K.epsilon())
    return precision

def f1_m(y_true, y_pred):
    precision = precision_m(y_true, y_pred)
    recall = recall_m(y_true, y_pred)
    return 2*((precision*recall)/(precision+recall+K.epsilon()))


model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['acc',f1_m,precision_m, recall_m])

history = model.fit(train_sequences, train_df['category'], 
                    epochs=10, batch_size=32, 
                    validation_data=(val_sequences, val_df['category'])). Когда я ее запускаю, я получаю. вот такую инофрмацию: Epoch 1/10
969/969 [==============================] - 1005s 1s/step - loss: -251.4834 - acc: 0.0783 - f1_m: 1.0002 - precision_m: 1.0005 - recall_m: 1.0000 - val_loss: -449.9998 - val_acc: 0.0723 - val_f1_m: 1.0000 - val_precision_m: 1.0000 - val_recall_m: 1.0000
Epoch 2/10
969/969 [==============================] - 1001s 1s/step - loss: -629.7628 - acc: 0.0784 - f1_m: 1.0000 - precision_m: 1.0000 - recall_m: 1.0000 - val_loss: -825.1327 - val_acc: 0.0723 - val_f1_m: 1.0000 - val_precision_m: 1.0000 - val_recall_m: 1.0000
Epoch 3/10
969/969 [==============================] - 984s 1s/step - loss: -998.2358 - acc: 0.0784 - f1_m: 1.0000 - precision_m: 1.0000 - recall_m: 1.0000 - val_loss: -1197.1260 - val_acc: 0.0723 - val_f1_m: 1.0000 - val_precision_m: 1.0000 - val_recall_m: 1.0000
Epoch 4/10
Верно ли я понимаю,что модель расходится?