![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
笔记
夏日与你
这个作者很懒,什么都没留下…
展开
-
报错:module ‘keras.optimizers‘ has no attribute ‘SGD‘
如果出现module ‘keras.optimizers’ has no attribute 'SGD’的错误model_final.compile(loss="categorical_crossentropy", optimizer=optimizers.SGD(lr=0.0001, momentum=0.9), metrics=["accuracy"])把代码改成这样即可model_final.compile(lo原创 2022-04-21 19:50:12 · 3995 阅读 · 0 评论 -
Tensorflow画loss和val_loss 、accuracy和 val_accuracy的图(便于分析)
首先,我们要知道哪儿里会产生这四个值?history = model_final.fit( train_generator, epochs=epochs, validation_data=validation_generator, validation_steps = int(nb_validation_samples / batch_size), callbacks=[checkpoint,early])当model.compile的metrics=[“acc原创 2022-04-21 19:44:27 · 3352 阅读 · 0 评论