resnet_utils.py 文件源码

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

项目:TFMaskRCNN 作者: hillox 项目源码 文件源码
def subsample(inputs, factor, scope=None):
  """Subsamples the input along the spatial dimensions.

  Args:
    inputs: A `Tensor` of size [batch, height_in, width_in, channels].
    factor: The subsampling factor.
    scope: Optional variable_scope.

  Returns:
    output: A `Tensor` of size [batch, height_out, width_out, channels] with the
      input, either intact (if factor == 1) or subsampled (if factor > 1).
  """
  if factor == 1:
    return inputs
  else:
    return slim.max_pool2d(inputs, [1, 1], stride=factor, scope=scope)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号