2021年1月30日星期六

what is reason RNN model get high accuracy low in testing? [closed]

I have an imbalanced dataset for time series to classifying the faults in the power system

I use RNN with sliding windows for multi classification. model = models.Sequential() model.add(layers.SimpleRNN(units=32, dropout=0.2, batch_input_shape=(batch_size1, win_length, num_features), return_sequences=False)) model.add(layers.Dense(num_classes, activation='softmax')) model.summary() model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['CategoricalAccuracy']) model.fit(train_generator, epochs=50, shuffle=False, batch_size=batch_size1,workers=0) model.summary() loss, accuracy = model.evaluate(test_generator) print(loss, accuracy)

https://stackoverflow.com/questions/65967977/what-is-reason-rnn-model-get-high-accuracy-low-in-testing January 30, 2021 at 08:31PM

没有评论:

发表评论