當前位置: 首頁>>代碼示例>>Python>>正文


Python RBM.output方法代碼示例

本文整理匯總了Python中rbm.RBM.output方法的典型用法代碼示例。如果您正苦於以下問題:Python RBM.output方法的具體用法?Python RBM.output怎麽用?Python RBM.output使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在rbm.RBM的用法示例。


在下文中一共展示了RBM.output方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: loadW

# 需要導入模塊: from rbm import RBM [as 別名]
# 或者: from rbm.RBM import output [as 別名]
    # result_path = 'data/4position_rumba/image7000/rbm1_train3434'
    # result_W = loadW(result_path)

    makeFolder()

    # def __init__(self, W, input, data_size,input_size, output_size, isDropout):
    rbm1 = RBM(None, result_data, file_num, rbm_size_list[0], rbm_size_list[1])
    for i in xrange(pre_train_epoch):
        print 'rbm1 pre_train:' + str(i)
        rbm1.contrast_divergence(i)
    reinput = rbm1.reconstruct_from_input(rbm1.input)
    saveImage(reinput, node_shape[2], 'rbm1_after_train')
    saveW(rbm1.getW(), 'rbm1_after_train')

    rbm2 = RBM(None, rbm1.output(), file_num, rbm_size_list[1], rbm_size_list[2])
    for i in xrange(pre_train_epoch):
        print 'rbm2 pre_train:' + str(i)
        rbm2.contrast_divergence(i)
    reinput = rbm2.reconstruct_from_input(rbm2.input)
    reinput = rbm1.reconstruct_from_output(reinput)
    saveImage(reinput, node_shape[2], 'rbm2_after_train')
    saveW(rbm2.getW(), 'rbm2_after_train')

    rbm3 = RBM(None, rbm2.output(), file_num, rbm_size_list[2], rbm_size_list[3])
    for i in xrange(pre_train_epoch):
        print 'rbm3 pre_train:' + str(i)
        rbm3.contrast_divergence(i)
    reinput = rbm3.reconstruct_from_input(rbm3.input)
    reinput = rbm2.reconstruct_from_output(reinput)
    reinput = rbm1.reconstruct_from_output(reinput)
開發者ID:hamalab-test,項目名稱:t.nishisaki,代碼行數:32,代碼來源:dbn.py

示例2: saveImage

# 需要導入模塊: from rbm import RBM [as 別名]
# 或者: from rbm.RBM import output [as 別名]
    cnn2.pre_train()
    output_list = cnn2.output()
    saveImage(output_list, node_shape[2], 'cnn2_after_train')

    rbm_size_list = (680, 340, 170, 85, 42, 21, 10, 3)

    # def __init__(self, W, input, data_size,input_size, output_size, isDropout):
    rbm1 = RBM(None, cnn2.output(), file_num, rbm_size_list[0], rbm_size_list[1], False)
    for i in xrange(pre_train_epoch):
        print 'rbm1 pre_train:' + str(i)
        rbm1.contrast_divergence()
    reinput = rbm1.reconstruct_from_input(rbm1.input)
    saveImage(reinput, node_shape[2], 'rbm1_after_train')
    saveW(rbm1.getW(), 'rbm1_after_train')

    rbm2 = RBM(None, rbm1.output(), file_num, rbm_size_list[1], rbm_size_list[2], False)
    for i in xrange(pre_train_epoch):
        print 'rbm2 pre_train:' + str(i)
        rbm2.contrast_divergence()
    reinput = rbm2.reconstruct_from_input(rbm2.input)
    reinput = rbm1.reconstruct_from_output(reinput)
    saveImage(reinput, node_shape[2], 'rbm2_after_train')
    saveW(rbm2.getW(), 'rbm2_after_train')

    rbm3 = RBM(None, rbm2.output(), file_num, rbm_size_list[2], rbm_size_list[3], False)
    for i in xrange(pre_train_epoch):
        print 'rbm3 pre_train:' + str(i)
        rbm3.contrast_divergence()
    reinput = rbm3.reconstruct_from_input(rbm3.input)
    reinput = rbm2.reconstruct_from_output(reinput)
    reinput = rbm1.reconstruct_from_output(reinput)
開發者ID:hamalab-test,項目名稱:t.nishisaki,代碼行數:33,代碼來源:dbn_slotcar.py

示例3: saveImage

# 需要導入模塊: from rbm import RBM [as 別名]
# 或者: from rbm.RBM import output [as 別名]
            output = rbm5.output_from_input(output)
            output = rbm6.output_from_input(output)
            output = rbm7.output_from_input(output)
            reinput = rbm7.reconstruct_from_output(output)
            reinput = rbm6.reconstruct_from_output(reinput)
            reinput = rbm5.reconstruct_from_output(reinput)
            reinput = rbm4.reconstruct_from_output(reinput)
            reinput = rbm3.reconstruct_from_output(reinput)
            reinput = rbm2.reconstruct_from_output(reinput)
            reinput = rbm1.reconstruct_from_output(reinput)
            saveImage(reinput, node_shape[2], 'rbm7_after_train')
            saveW(rbm7.getW(), 'rbm7_after_train')

            os.chdir('../../')

        output = rbm1.output()
        output = rbm2.output_from_input(output)
        output = rbm3.output_from_input(output)
        output = rbm4.output_from_input(output)
        output = rbm5.output_from_input(output)
        output = rbm6.output_from_input(output)
        output = rbm7.output_from_input(output)

        input = rbm7.reconstruct_from_output(output)
        input = rbm6.reconstruct_from_output(input)
        input = rbm5.reconstruct_from_output(input)
        input = rbm4.reconstruct_from_output(input)
        input = rbm3.reconstruct_from_output(input)
        input = rbm2.reconstruct_from_output(input)
        input = rbm1.reconstruct_from_output(input)
開發者ID:hamalab-test,項目名稱:t.nishisaki,代碼行數:32,代碼來源:dbn_finetuning.py


注:本文中的rbm.RBM.output方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。