QuickDraw_noisy_classifier.py 文件源码

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

项目:Google-QuickDraw 作者: ankonzoid 项目源码 文件源码
def add_noise(x_clean, noise_factor):
    x = x_clean.copy()
    x_shape = x.shape
    x = x + noise_factor * 255 * (np.random.normal(loc=0.0, scale=1.0, size=x_shape) + 1) / 2
    x_noisy = np.clip(x, 0., 255.)
    return x_noisy

# converts image list to a normed image list (used as input for NN)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号