exploration.py 文件源码

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

项目:human-rl 作者: gsastry 项目源码 文件源码
def gaussian_kernel(size, std=1.):
    size2 = 1 + 2 * size
    kernel = np.zeros((size2, size2))

    den = 2. * std * std

    for row in range(size2):
        for col in range(size2):
            x = row - size
            y = row - size

            kernel[row, col] = np.exp(-(x*x + y*y) / den)

    kernel /= kernel.sum()

    return kernel

# TODO: check out of bounds
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号