我正在尝试获取训练和验证准确性值,但它没有返回acc
和val_acc
值。
model.compile(loss = 'sparse_categorical_crossentropy',
optimizer = 'RMSprop',
lr = 0.001,
metrices = ['accuracy'])
# prepare the generators
train_gen = train_datagen.flow(training_images,
training_labels,
batch_size = 64
)
validation_gen = validation_datagen.flow(testing_images,
testing_labels,
batch_size = 64
)
# Train the Model
history = model.fit_generator(train_gen,
epochs = 20,
validation_data = validation_gen
)