- 首先:
network = tf.layers.InputLayer(x, name = 'input_layer')
- 然后:
conv:
network = .....
fc:
network = FlattenLayer(network, name='flatten')
network = DenseLayer(network, n_units=1024, act=tf.nn.relu, name='fc1')
network = DenseLayer(network, n_units=1024, act=tf.nn.relu, name='fc2')
network = DenseLayer(network, n_units=2, act=tl.activation.identity, name='fc3')
最后:
y = network.outputs
logit = tf.nn.softmax(y)
输出预测logit值
网友评论