Closed sunsided closed 7 years ago
This PR handles #56 by replacing
if denoising: current_input = utils.corrupt(x) * corrupt_prob + x * (1 - corrupt_prob) # 2d -> 4d if convolution x_tensor = utils.to_tensor(x) if convolutional else x current_input = x_tensor
with
# apply noise if denoising x_ = (utils.corrupt(x) * corrupt_prob + x * (1 - corrupt_prob)) if denoising else x # 2d -> 4d if convolution x_tensor = utils.to_tensor(x_) if convolutional else x_ current_input = x_tensor
The temporary x_ was introduced to keep the original input x intact for the loss function.
x_
x
Nice one! Thank you!
This PR handles #56 by replacing
with
The temporary
x_
was introduced to keep the original inputx
intact for the loss function.