我是TFLearn的新手。
我当时正在学习这个介绍教程到TFLearn,其中设定了固定数量的历元。然而,我想知道是否有可能使用组合learning_rate和准确性来确定网络培训的结束.例如:根据精度的降低或提高learning_rate .或者根据准确性停止训练。
# Build neural network
net = tflearn.input_data(shape=[None, 6])
net = tflearn.fully_connected(net, 32)
net = tflearn.fully_connected(net, 32)
net = tflearn.fully_connected(net, 2, activation='softmax')
net = tflearn.regression(net)
# Define model
model = tflearn.DNN(net)
# Start training (apply gradient descent algorithm)
model.fit(data, labels, n_epoch=10, batch_size=16, show_metric=True):)
发布于 2017-09-15 05:18:10
查看http://tflearn.org/models/dnn/、best_checkpoint_path和best_val_accuracy。参数将保存您最好的检查点。
如果您想要停止培训,您必须自己编写一个回调程序来停止培训。下面是关于早期停止使用TFlearn:http://mckinziebrandon.me/TensorflowNotebooks/2016/11/28/early-stop-solution.html的很好的教程
https://stackoverflow.com/questions/46172624
复制相似问题