features.py 文件源码

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

项目:detection-2016-nipsws 作者: imatge-upc 项目源码 文件源码
def interpolate_2d_features(features):
    out_size = feature_size
    x = np.arange(features.shape[0])
    y = np.arange(features.shape[1])
    z = features
    xx = np.linspace(x.min(), x.max(), out_size)
    yy = np.linspace(y.min(), y.max(), out_size)
    new_kernel = interpolate.RectBivariateSpline(x, y, z, kx=1, ky=1)
    kernel_out = new_kernel(xx, yy)
    return kernel_out


# Interpolation 2d of each channel, so we obtain 3d interpolated feature maps
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号