Rounds inputs / step_size
stochastically.
tfc.ops.stochastic_round(
inputs, step_size, seed, name=None
)
This op computes the elementwise function:
output = { floor(x) with prob. p = x - floor(x) floor(x) + 1 with prob. 1 - p } where x = input / step_size.
Returns | |
---|---|
A Tensor of type int32 .
Integer tensor of same shape as inputs , containing rounded values.
|