vgg16.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:HandDetection 作者: YunqiuXu 项目源码 文件源码
def _image_to_head(self, is_training, reuse=False):
    with tf.variable_scope(self._scope, self._scope, reuse=reuse):

      # [VGG16] conv1
      # input shape : 224 * 224 * 3
      # output shape : 112 * 112 * 64
      net = slim.repeat(self._image, 2, slim.conv2d, 64, [3, 3],
                          trainable=False, scope='conv1')
      net = slim.max_pool2d(net, [2, 2], padding='SAME', scope='pool1')

      # [VGG16] conv2
      # input shape : 112 * 112 * 64
      # output shape : 56 * 56 * 128
      net = slim.repeat(net, 2, slim.conv2d, 128, [3, 3],
                        trainable=False, scope='conv2')
      net = slim.max_pool2d(net, [2, 2], padding='SAME', scope='pool2')

      # [Hand Detection] REMOVE net = slim.max_pool2d(net, [2, 2], padding='SAME', scope='pool3') 
      # [Hand Detection] conv3
      # input shape : 56 * 56 * 128
      # output shape : 56 * 56 * 256
      net = slim.repeat(net, 3, slim.conv2d, 256, [3, 3],
                        trainable=is_training, scope='conv3')
      to_be_normalized_1 = net

      # [Hand Detection] conv4
      # input shape : 56 * 56 * 256
      # output shape : 56 * 56 * 256
      net = slim.repeat(net, 3, slim.conv2d, 512, [3, 3],
                        trainable=is_training, scope='conv4')
      to_be_normalized_2 = net 

      # [Hand Detection] conv5
      # input shape : 56 * 56 * 256
      # output shape : 56 * 56 * 256
      net = slim.repeat(net, 3, slim.conv2d, 512, [3, 3],
                        trainable=is_training, scope='conv5')
      to_be_normalized_3 = net

      return to_be_normalized_1, to_be_normalized_2, to_be_normalized_3
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号