nnutil.py 文件源码

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

项目:social-scene-understanding 作者: cvlab-epfl 项目源码 文件源码
def multiscale_features(graph, names, dims, size, scope='features'):
  """
  extract features from multiple endpoints, do dimensionality
  reduction and resize to the given size
  """
  with tf.variable_scope(scope):
    endpoints = []
    for i, name in enumerate(names):
      endpoint = graph.get_tensor_by_name(name)
      if not dims is None:
        endpoint = slim.conv2d(endpoint, dims[i], 1,
                               activation_fn=None,
                               normalizer_fn=None)
      endpoint = tf.image.resize_images(endpoint, size[0], size[1])
      endpoints.append(endpoint)
  return tf.concat(3, endpoints)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号