def model(H, x, training):
net = dropout(x, 0.5, is_training = training)
# net = conv2d(net, 64, [3, 3], activation_fn = tf.nn.relu)
# net = conv2d(net, 64, [3, 3], activation_fn = tf.nn.relu)
# net = max_pool2d(net, [2, 2], padding = 'VALID')
# net = conv2d(net, 128, [3, 3], activation_fn = tf.nn.relu)
# net = conv2d(net, 128, [3, 3], activation_fn = tf.nn.relu)
# net = max_pool2d(net, [2, 2], padding = 'VALID')
# ksize = net.get_shape().as_list()
# net = max_pool2d(net, [ksize[1], ksize[2]])
net = fully_connected(flatten(net), 256, activation_fn = tf.nn.relu)
net = dropout(net, 0.5, is_training = training)
logits = fully_connected(net, 1, activation_fn = tf.nn.sigmoid)
preds = tf.cast(tf.greater(logits, 0.5), tf.int64)
return logits, preds
评论列表
文章目录