GauravBh1010tt / DL-Seq2Seq

Implementation of papers on Deep Seq2seq learning using Pytorch.
MIT License
220 stars 35 forks source link

Unconditional sketch generation producing same output #3

Open alasin opened 5 years ago

alasin commented 5 years ago

Hi,

Thanks for open-sourcing your implementation. I tried the unconditional variant of your sketch generation model and I'm getting the same output for multiple calls to skrnn_sample followed by draw_image. Is this expected?

GauravBh1010tt commented 5 years ago

You need to set random_state parameter in the skrnn_sample module. By default it is set at 98, that's why you are getting same image for multiple calls. While sampling from the trained model we need to generate samples using gmm layer, so generating similar output again and again is not possible. As a solution, for each random_state the model's parameters are initialized with similar values. So you can generate an output for a fixed initialiazation of parameters again.

Hope it clears your doubt.