【问题标题】:Controlling learning_rate does not tflearn控制 learning_rate 不 tflearn
【发布时间】:2017-09-12 09:21:48
【问题描述】:

我是 TFLearn 的新手。

我正在向 TFLearn 研究这个 introduction tutorial,其中设置了固定数量的 epoch。但是我想知道是否可以使用 learning_rateaccuracy 的组合来确定网络训练的结束... 例如:根据准确率降低或增加 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)

:)

【问题讨论】:

    标签: tensorflow neural-network tflearn


    【解决方案1】:

    查看http://tflearn.org/models/dnn/best_checkpoint_pathbest_val_accuracy。参数将保存您的最佳检查点。

    如果你想停止训练,你必须自己编写一个回调来停止训练。这是一个关于使用 TFlearn 提前停止的好教程:http://mckinziebrandon.me/TensorflowNotebooks/2016/11/28/early-stop-solution.html

    【讨论】:

      猜你喜欢
      • 2021-07-09
      • 2017-12-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-11-04
      • 1970-01-01
      • 1970-01-01
      • 2018-03-21
      相关资源
      最近更新 更多