with tf.Session() as sess:
    sess.run(init)

    # run the training part
    # =====================

    print('Begin training: ', datetime.now())

    # retrieve training set
    trainSet = cf.ipss_app.getTrainSet(train_points)
    train_x, train_y = cf.transfer2PyArrays(trainSet)

    #print2DArray(train_x, 'train_xSet', 'train_x')
    #print2DArray(train_y, 'train_ySet', 'train_y')

    train_x, aver_x, ran_x = cf.normalization(train_x)

    train_y, aver_y, ran_y = cf.normalization(train_y)
    # run the training part
    for i in range(1000):
        if (i % 100 == 0): print('Training step: ', i)
        sess.run(train, {x: train_x, y: train_y})

    print('End training: ', datetime.now())

    # run the verification part
    # =========================

    # retrieve a test case
    # retrieve a test case
Esempio n. 2
0
with tf.Session() as sess:
    sess.run(init)

    # run the training part
    # =====================

    print('Begin training: ', datetime.now())

    # retrieve training set
    trainSet = cf.ipss_app.getTrainSet(train_points)
    train_x, train_y = cf.transfer2PyArrays(trainSet)

    #print2DArray(train_x, 'train_xSet', 'train_x')
    #print2DArray(train_y, 'train_ySet', 'train_y')

    train_x, aver_x, ran_x = cf.normalization(train_x)

    train_y, aver_y, ran_y = cf.normalization(train_y)
    # run the training part
    for i in range(1000):
        if (i % 100 == 0): print('Training step: ', i)
        sess.run(train, {x: train_x, y: train_y})

    print('End training: ', datetime.now())

    # run the verification part
    # =========================

    # retrieve a test case
    # retrieve a test case