layer3_conv = tf.nn.conv2d(layer2_pool, variables['w3'], [1, 1, 1, 1], padding='SAME')
layer3_actv = tf.nn.relu(layer3_conv + variables['b3'])
layer4_conv = tf.nn.conv2d(layer3_actv, variables['w4'], [1, 1, 1, 1], padding='SAME')
layer4_actv = tf.nn.relu(layer4_conv + variables['b4'])
layer4_pool = tf.nn.max_pool(layer4_pool, [1, 2, 2, 1], [1, 2, 2, 1], padding='SAME')
layer5_conv = tf.nn.conv2d(layer4_pool, variables['w5'], [1, 1, 1, 1], padding='SAME')
layer5_actv = tf.nn.relu(layer5_conv + variables['b5'])
layer6_conv = tf.nn.conv2d(layer5_actv, variables['w6'], [1, 1, 1, 1], padding='SAME')
layer6_actv = tf.nn.relu(layer6_conv + variables['b6'])
layer7_conv = tf.nn.conv2d(layer6_actv, variables['w7'], [1, 1, 1, 1], padding='SAME')
layer7_actv = tf.nn.relu(layer7_conv + variables['b7'])
layer7_pool = tf.nn.max_pool(layer7_actv, [1, 2, 2, 1], [1, 2, 2, 1], padding='SAME')
layer8_conv = tf.nn.conv2d(layer7_pool, variables['w8'], [1, 1, 1, 1], padding='SAME')
layer8_actv = tf.nn.relu(layer8_conv + variables['b8'])
layer9_conv = tf.nn.conv2d(layer8_actv, variables['w9'], [1, 1, 1, 1], padding='SAME')
layer9_actv = tf.nn.relu(layer9_conv + variables['b9'])
layer10_conv = tf.nn.conv2d(layer9_actv, variables['w10'], [1, 1, 1, 1], padding='SAME')
layer10_actv = tf.nn.relu(layer10_conv + variables['b10'])
layer10_pool = tf.nn.max_pool(layer10_actv, [1, 2, 2, 1], [1, 2, 2, 1], padding='SAME')
layer11_conv = tf.nn.conv2d(layer10_pool, variables['w11'], [1, 1, 1, 1], padding='SAME')
layer11_actv = tf.nn.relu(layer11_conv + variables['b11'])
layer12_conv = tf.nn.conv2d(layer11_actv, variables['w12'], [1, 1, 1, 1], padding='SAME')
layer12_actv = tf.nn.relu(layer12_conv + variables['b12'])
layer13_conv = tf.nn.conv2d(layer12_actv, variables['w13'], [1, 1, 1, 1], padding='SAME')
layer13_actv = tf.nn.relu(layer13_conv + variables['b13'])
layer13_pool = tf.nn.max_pool(layer13_actv, [1, 2, 2, 1], [1, 2, 2, 1], padding='SAME')
flat_layer = flatten_tf_array(layer13_pool)
layer14_fccd = tf.matmul(flat_layer, variables['w14']) + variables['b14']
layer14_actv = tf.nn.relu(layer14_fccd)
layer14_drop = tf.nn.dropout(layer14_actv, 0.5)
layer15_fccd = tf.matmul(layer14_drop, variables['w15']) + variables['b15']
layer15_actv = tf.nn.relu(layer15_fccd)
layer15_drop = tf.nn.dropout(layer15_actv, 0.5)
logits = tf.matmul(layer15_drop, variables['w16']) + variables['b16']
return logits
評(píng)論
查看更多