|View source on GitHub|
Perturbs the inputs of a pointwise function.
tfc.ops.perturb_and_apply( f, x, *args, u=None, x_plus_u=None, expected_grads=True )
This function adds uniform noise in the range -0.5 to 0.5 to the first argument of the given function. It further replaces derivatives of the function with (analytically computed) expected derivatives w.r.t. the noise.
This is described in Sec. 4.2. in the paper
"Universally Quantized Neural Compression"
Eirikur Agustsson & Lucas Theis
A tuple (y, x+u) where y=f(x+u, *args) and u is uniform noise, and the