1
어떻게 뉴런 네트워크의 레이어를 tensorflow로 수정할 수 있습니까?뉴런 네트워크의 레이어를 수정하십시오.
예를 들어,이 예제 프로그램에서 다른 신경망을 훈련하여 두 번째 계층을 알면 (예 : B) 말하십시오. 이를 고정 레이어로 사용하고 아래의 네트워크에서 첫 번째 레이어를 계산할 수 있습니까?
import tensorflow as tf
x = tf.placeholder(tf.float32, [None, 784])
#layer 1
W1 = tf.Variable(tf.zeros([784, 100]))
b1 = tf.Variable(tf.zeros([100]))
y1 = tf.matmul(x, W1) + b1 #remove softmax
#layer 2
W2 = tf.Variable(tf.zeros([100, 10]))
b2 = tf.Variable(tf.zeros([10]))
y2 = tf.nn.softmax(tf.matmul(y1, W2) + b2)
#output
y = y2
y_ = tf.placeholder(tf.float32, [None, 10])