http://deeplearning.net/tutorial/SdA.html#sdaのチュートリアル Stacked DenoisingAutoencodersでは、pretraining_functions は、各 dA レイヤーのトレーニング関数を表す関数のリストを返します。しかし、すべての dA レイヤーに同じ入力 ( ) を与える理由がわかりませんtrain_set_x
。実際には、各 dA レイヤーの入力は、最初の dA レイヤーを除く下のレイヤーの出力である必要があります。これらのコードが正しい理由を誰か教えてもらえますか?
pretrain_fns = []
for dA in self.dA_layers:
# get the cost and the updates list
cost, updates = dA.get_cost_updates(corruption_level, learning_rate)
# compile the theano function
fn = theano.function(inputs=[index,
theano.Param(corruption_level, default=0.2),
theano.Param(learning_rate, default=0.1)],
outputs=cost,
updates=updates,
givens={self.x: train_set_x[batch_begin:batch_end]})
# append `fn` to the list of functions
pretrain_fns.append(fn)