zoukankan      html  css  js  c++  java
  • tflearn Training Step每次 We will run it for 10 epochs (the network will see all data 10 times) with a batch size of 16. n_epoch=10, batch_size=16

    Training

    TFLearn provides a model wrapper 'DNN' that can automatically performs a neural network classifier tasks, such as training, prediction, save/restore, etc... We will run it for 10 epochs (the network will see all data 10 times) with a batch size of 16.

    # 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)
    

    Output:

    ---------------------------------
    Run id: MG9PV8
    Log directory: /tmp/tflearn_logs/
    ---------------------------------
    Training samples: 1309
    Validation samples: 0
    --
    Training Step: 82  | total loss: 0.64003
    | Adam | epoch: 001 | loss: 0.64003 - acc: 0.6620 -- iter: 1309/1309
    --
    Training Step: 164  | total loss: 0.61915
    | Adam | epoch: 002 | loss: 0.61915 - acc: 0.6614 -- iter: 1309/1309
    --
    Training Step: 246  | total loss: 0.56067
    | Adam | epoch: 003 | loss: 0.56067 - acc: 0.7171 -- iter: 1309/1309
    --
    Training Step: 328  | total loss: 0.51807
    | Adam | epoch: 004 | loss: 0.51807 - acc: 0.7799 -- iter: 1309/1309
    --
    Training Step: 410  | total loss: 0.47475
    | Adam | epoch: 005 | loss: 0.47475 - acc: 0.7962 -- iter: 1309/1309
    --
    Training Step: 492  | total loss: 0.51677
    | Adam | epoch: 006 | loss: 0.51677 - acc: 0.7701 -- iter: 1309/1309
    --
    Training Step: 574  | total loss: 0.48988
    | Adam | epoch: 007 | loss: 0.48988 - acc: 0.7891 -- iter: 1309/1309
    --
    Training Step: 656  | total loss: 0.55073
    | Adam | epoch: 008 | loss: 0.55073 - acc: 0.7427 -- iter: 1309/1309
    --
    Training Step: 738  | total loss: 0.50242
    | Adam | epoch: 009 | loss: 0.50242 - acc: 0.7854 -- iter: 1309/1309
    --
    Training Step: 820  | total loss: 0.41557
    | Adam | epoch: 010 | loss: 0.41557 - acc: 0.8110 -- iter: 1309/1309
    --
    

    Our model finish to train with an overall accuracy around 81%, which means that it can predict the correct outcome (survived or not) for 81% of the total passengers.

  • 相关阅读:
    Validation failed for one or more entities
    sql 存储过程
    SQL Server分页3种方案比拼
    case when 用法
    C#如何计算代码执行时间
    透过 Jet.OLEDB 读取 Excel里面的数据
    DataBinding?资料系结?资料绑定?
    ASP.NET的OutputCache
    我想写程序#3 之 「简单地设计自己的数据表(Table)」
    我想写程序#1 之 「先确立志向」
  • 原文地址:https://www.cnblogs.com/bonelee/p/8124602.html
Copyright © 2011-2022 走看看