pkmital / CADL

ARCHIVED: Contains historical course materials/Homework materials for the FREE MOOC course on "Creative Applications of Deep Learning w/ Tensorflow" #CADL
https://www.kadenze.com/courses/creative-applications-of-deep-learning-with-tensorflow/info
Apache License 2.0
1.48k stars 732 forks source link

Denoising VAE implementation broken #56

Closed sunsided closed 7 years ago

sunsided commented 7 years ago

In the code for the VAE function (lines 97-102 as per bcdb0191ce65c29e8434243aab2016dd89a1b752) appears to be a bug that prevents the usage of corrupted inputs:

    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

Here, the current_input tensor is directly overwritten by x_tensor. It appears to be the case for all sessions.

pkmital commented 7 years ago

Nice catch! Feel free to submit a PR.

sunsided commented 7 years ago

Here's a fix - not sure though if this is what you had in mind, style and all. Hope it doesn't break more than it fixes.