Unsolved reference 'keep_prob' のエラーが出ました。
TensorFlowでドロップアウト層の追加を行っていて、以下のようなコードを書きました。
# fc3 with tf.variable_scope('fc3') as scope: weights = _get_weights(shape=[dim,384],stddev=0.04) biases = _get_biases([384],value=0.1) fc3 = tf.nn.dropout(reshape,keep_prob) fc3 = tf.nn.relu( tf.matmul(reshape,weights) + biases, name=scope.name )
この時、
fc3 = tf.nn.dropout(reshape,keep_prob)
のkeep_probがないとエラーが出ました。
でもdropoutメソッドはkeep_probを引数に持つのでなぜこのエラーが出るのかわかりません。どう直せばよいのでしょうか?
あなたの回答
tips
プレビュー