我用於卷積神經網絡下面的代碼在以下鏈接:https://github.com/aymericdamien/TensorFlow-Examples/blob/master/examples/3_NeuralNetworks/convolutional_network.py和我想設定的參數爲我的模型:如何設置CNNs TensorFlow中的網絡權重?
我的輸入是35 * 128
一個陣列我設置以下網絡參數:
# Network Parameters
n_input = 35*128
n_classes = 6
dropout = 0.75
請問我可以讓我知道如何設置權重和偏差?默認值爲:
# Store layers weight & bias
weights = {
# 5x5 conv, 1 input, 32 outputs
'wc1': tf.Variable(tf.random_normal([5, 5, 1, 32])),
# 5x5 conv, 32 inputs, 64 outputs
'wc2': tf.Variable(tf.random_normal([5, 5, 32, 64])),
# fully connected, 7*7*64 inputs, 1024 outputs
'wd1': tf.Variable(tf.random_normal([7*7*64, 1024])),
# 1024 inputs, 10 outputs (class prediction)
'out': tf.Variable(tf.random_normal([1024, n_classes]))
}
biases = {
'bc1': tf.Variable(tf.random_normal([32])),
'bc2': tf.Variable(tf.random_normal([64])),
'bd1': tf.Variable(tf.random_normal([1024])),
'out': tf.Variable(tf.random_normal([n_classes]))
}
您已經使用正態隨機分佈的值對它們進行了初始化。 'tf.random_normal()'照顧初始化 – Sriram