фрагмент файла json ({"Sourcehostname": "ELC-SRV01", "EventId": 0.13333333333333336, "ThreadId": 0.16718266253869973, "Image": 0.3333333333333333, "UtcTime": "2023-12-04 05:18:56.265", "Class": 0}
{"Sourcehostname": "ELC-SRV01", "EventId": 0.13333333333333336, "ThreadId": 0.16718266253869973, "Image": 0.3333333333333333, "UtcTime": "2023-12-04 05:19:06.290", "Class": 0}
{"Sourcehostname": "ELC-SRV01", "EventId": 0.13333333333333336, "ThreadId": 0.16718266253869973, "Image": 0.3333333333333333, "UtcTime": "2023-12-04 05:19:16.306", "Class": 0}
{"Sourcehostname": "director", "EventId": 0.0, "ThreadId": 0.0, "Image": 1.0, "UtcTime": "2023-12-04 04:12:08.202", "Class": 1}
{"Sourcehostname": "director", "EventId": 0.26666666666666666, "ThreadId": 0.0, "Image": 0.6666666666666666, "UtcTime": "2023-12-04 04:12:08.233", "Class": 1}
{"Sourcehostname": "director", "EventId": 0.0, "ThreadId": 0.0, "Image": 0.6666666666666666, "UtcTime": "2023-12-04 04:12:08.342", "Class": 1}
{"Sourcehostname": "director", "EventId": 0.0, "ThreadId": 0.0, "Image": 1.0, "UtcTime": "2023-12-04 04:12:08.440", "Class": 1}
{"Sourcehostname": "director", "EventId": 0.26666666666666666, "ThreadId": 0.0, "Image": 0.6666666666666666, "UtcTime": "2023-12-04 04:12:08.487", "Class": 1}
{"Sourcehostname": "director", "EventId": 0.0, "ThreadId": 0.0, "Image": 0.6666666666666666, "UtcTime": "2023-12-04 04:12:08.581", "Class": 1}) данных этих двух юзеров более 4х тысяч . Код (class DataGenerator(Sequence):
    def __init__(self, filename, batch_size, window_size, shuffle=True):
        self.filename = filename
        self.batch_size = batch_size
        self.window_size = window_size
        self.shuffle = shuffle
        self.data, self.labels = self._load_data()
        self.indexes = np.arange(len(self.data))

    def _load_data(self):
        data = []
        labels = []
        with open(self.filename, 'r', encoding='utf-8') as file:
            for line in file:
                event = json.loads(line)
                data.append([event['EventId'], event['ThreadId'], event['Image']])
                labels.append(event['Class'])
        
        sequences = []
        sequence_labels = []
        for i in range(len(data) - self.window_size + 1):
            sequences.append(data[i:i+self.window_size])
            sequence_labels.append(labels[i+self.window_size - 1])
        print (sequences[1], sequence_labels[1])
        return sequences, sequence_labels

    def __on_epoch_end__(self):
        if self.shuffle:
            np.random.shuffle(self.indexes)

    def __getitem__(self, index):
        batch_indexes = self.indexes[index * self.batch_size:(index + 1) * self.batch_size]
        X = np.array([self.data[k] for k in batch_indexes])
        y = np.array([self.labels[k] for k in batch_indexes])
        return X, y

    def __len__(self):
        return len(self.data) // self.batch_size

input_file_name = '23.jsonl'
batch_size = 100
window_size = 100
n_features = 3  

model = Sequential([
    GRU(100, return_sequences=True, input_shape=(window_size, n_features)),
    GRU(100, return_sequences=True, input_shape=(window_size, n_features)),
    GRU(128, return_sequences=False),
    Dense(1, activation='sigmoid')  
])
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])

train_generator = DataGenerator(filename=input_file_name, batch_size=batch_size, window_size=window_size)

model.fit(train_generator, epochs=1)

model.save('neural_network_model.h5')
)  нужжо найти ошибки в коде, так как нейронная сеть обучается неправильно