chrisdonahue / wavegan

WaveGAN: Learn to synthesize raw audio with generative adversarial networks
MIT License
1.32k stars 283 forks source link

Question) Using reflection padding for Phase Shuffle??? #30

Closed soohyun123 closed 5 years ago

soohyun123 commented 5 years ago

Hi, I'm an undergrad student, and recently I've been studying your paper and code: ADVERSARIAL AUDIO SYNTHESIS.

I leave this issue thread out of curiosity about your implementation of the function apply_phaseshuffle(x, rad, pad_type='reflect').

so, you used 'reflect' mode for tf.pad function,

which means, for example, for an original array [1 2 3 4 5 6 7],

it results in [4 3 2 1 2 3 4 5 6 7] for phase = 3 ==> pad_l = 3, pad_r = 0.

Then we crop only the part [4 3 2 1 2 3 4] the final result of phase suffling.

At this point, these are my questions:

First, is my understanding of your phase suffling correct??

If it is correct, I guess it means we totally lose some data, 5 6 7, of the original array....

Does this not make any problem???? T-T

chrisdonahue commented 5 years ago

Hi there.

Yes, your understanding of phase shuffle is correct. Some data is lost. This can be thought of as a regularization strategy, similar to dropout (which also loses data). Although, only the data at the edges is lost, and most of the center is preserved.