diff --git a/modules/deeplearning/srcnn_l1b_l2.py b/modules/deeplearning/srcnn_l1b_l2.py index 57ff96bb85034c331e2b1b5f64baa51791a453c8..018b2bf4411cb6f2042c5c085bcbbd3b845f0562 100644 --- a/modules/deeplearning/srcnn_l1b_l2.py +++ b/modules/deeplearning/srcnn_l1b_l2.py @@ -709,6 +709,10 @@ def analyze(): grd_lr = grd[::2, ::2] print(grd_lr.shape) leny, lenx = grd_lr.shape + rnd = np.random.normal(loc=0, scale=0.001, size=grd_lr.size) + grd_lr += rnd + grd_lr = np.where(grd_lr < 0, 0, grd_lr) + grd_lr = np.where(grd_lr > 1, 1, grd_lr) x = np.arange(lenx) y = np.arange(leny)