Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MDN implementation #20

Merged
merged 39 commits into from
Nov 2, 2020
Merged

MDN implementation #20

merged 39 commits into from
Nov 2, 2020

Conversation

taroushirani
Copy link
Contributor

@taroushirani taroushirani commented Sep 26, 2020

Hello, I made sample implementation of Mixture Density Networks for better timelag prediction following Sinsy[1].
Contrary to my expectations, there is no statistically significance among the current timelag model and MDN-based models.
(As for duration model, the results of MDN-based models are poorer than that of conventional one(see statistical analysis below)).

I checked my code repeatedly but I could not find my mistakes. Could anyone please advise me to improve the quality?

  1. http://www.apsipa.org/proceedings/2018/pdfs/0001003.pdf

mdn_timelag
mdn_duration
In this experiment I use NIT-SONG070 data-set, and the number of Gaussian components of MDN and RMDN model are
set to 500, 100 respectively.

Statistical analysis

  • Normality test
    timelag: ShapiroResult(statistic=0.943882942199707, pvalue=9.166962328110984e-12)
    duration: ShapiroResult(statistic=0.6752718687057495, pvalue=1.4900654531575684e-37)

Errors seems not to be distributed normally, so we use a non-parametric test.

  • Kruskal-Wallis test
    timelag:KruskalResult(statistic=0.12859137306783802, pvalue=0.9377276850847137)
    duration:KruskalResult(statistic=18.355098064661238, pvalue=0.00010333349007178473)

There seems to be statistically significance among duration errors of these models.

  • Conover’s test
duration Conventional MDN RMDN
Conventional 1.000000 0.000115 0.000333
MDN 0.000115 1.000000 0.785517
RMDN 0.000333 0.785517 1.000000

The conventional model is statistically more accurate than other 2 models.

commit 735b2c3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 23:01:54 2020 +0900

    Change acoustic model from RMDN to Conv1dResnet

commit 171d06d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 22:42:29 2020 +0900

    Change num_gaussians of timelag and duration model from 30 to 1000

commit d034811
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 12:03:32 2020 +0900

    Minor fix.

commit 48f3bf7
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 11:54:47 2020 +0900

    Minor fix

commit 9e07c70
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 11:47:58 2020 +0900

    Change batch_size from 2 to 1.

commit 6014169
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 11:35:29 2020 +0900

    Change num_gaussians from default(30) to 10

commit 62dda2f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 11:34:45 2020 +0900

    Use torch.sum instead of torch.prod to avoid loss goes to nan.

commit bef2d3f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 01:59:41 2020 +0900

    Change duration model from RMDN to LSTM

commit edd2397
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 01:34:14 2020 +0900

    Change acoustic model to RMDN

commit 647dca3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 01:33:53 2020 +0900

    Correct comments.

commit 0a87efe
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 01:10:43 2020 +0900

    Minor fix

commit ac88d1d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 00:59:41 2020 +0900

    Add mdn support.

commit b08327c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 00:59:29 2020 +0900

    Delete debug print.

commit 33d810b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 00:58:44 2020 +0900

    Discard values of torch.return_types.max

commit 07f5d02
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 00:06:27 2020 +0900

    Add 03-mdn-world recipe.

commit bc60f9c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sat Sep 26 00:01:27 2020 +0900

    Adapt to the data structure of NNSVS.

commit 07f122a
Merge: 69b5f71 7d9e184
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Sep 25 21:32:28 2020 +0900

    Merge branch 'master' into mdn_dev

commit 69b5f71
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Sep 25 21:30:02 2020 +0900

    Refactoring.

commit 2ad7bbf
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Sep 25 20:37:00 2020 +0900

    Add MDN implementation.
Copy link
Collaborator

@r9y9 r9y9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your great contribution! I added a few comments on numerical stability and efficiency. Besides, I have one suggestion to make it work better: use a small number of Gaussians! 500 sounds extremely large to me. In my experience, 10 would be good for a general choice.

I looked into the Hono's paper again and they used 1 mixture component. This is reasonable to me for duration modeling since the output is 1 dimension and the task is not very complicated. We might want to increase the number of Gaussians for acoustic modeling though.

For reference, https://static.googleusercontent.com/media/research.google.com/ja//pubs/archive/42020.pdf, Heiga uses 1-to-16 mixtures for DNN-based TTS task. According to the paper, 2 mixture was good enough (8 mixture was the best).

So, could you try adjusting the number of Gaussians? 1, 2, 4, 8, 16 would be good to go. You might feel 1 is not very effective, but sometimes it works comparable to 10 mixtures and training becomes very stable. https://arxiv.org/abs/1807.07281

nnsvs/mdn.py Outdated
Comment on lines 69 to 70
# p(y|x,w) = exp(log p(y|x,w))
loss = torch.exp(g.log_prob(target))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your comment. I changed mdn_loss according to your advice.

nnsvs/mdn.py Outdated
Comment on lines 96 to 101
mode = torch.zeros(batch_size, max_T, out_dim)
for i in range(batch_size):
for j in range(max_T):
for k in range(out_dim):
mode[i, j, k] = mu[i, j, max_component[i, j], k]
return mode
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is not efficient... Can we do better at this?

https://github.com/r9y9/wavenet_vocoder/blob/63d3fe0a85a69aa25d80700974fe282c96fb6b65/wavenet_vocoder/mixture.py#L221-L270 I implemented sampling from Gaussian mixtures a while ago. It might be useful as a reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your comment. Do you mean I should do this without for loop, or I should do this in more probabilistic manner? I borrow to_one_hot from your wavenet_vocoder/wavenet_vocoer/mixture.py and re-implement this without for loop. And I add mdn_sample to sample predicted variables in probabilistic manner.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant it would be great removing the for loop for efficiency. Taking a mean is okay.

@taroushirani
Copy link
Contributor Author

taroushirani commented Sep 28, 2020

Thank you for your comment. I changed the code according to your advice and add some test code (and sorry for forgetting squash merge). I'll try smaller number of Gaussians later.

@taroushirani
Copy link
Contributor Author

taroushirani commented Sep 28, 2020

I did the same experiment once again with smaller number of Gaussian components. I made use of NIT-SONG070 data-set and each model has 2 hidden layers with 128 dims. There seems no statistical significance in timelag model, but some models in duration are statistically poorer than conventional one.

mdn_stats

Statistical analysis

Normality test

timelag: ShapiroResult(statistic=0.922505795955658, pvalue=6.90394944215795e-28)
duration: ShapiroResult(statistic=0.8082517385482788, pvalue=0.0)

Errors seems not to be distributed normally, so I use a non-parametric test.

Kruskal-Wallis test

timelag:KruskalResult(statistic=12.580251469105907, pvalue=0.24809602556265878)
duration:KruskalResult(statistic=133.5905905860436, pvalue=8.636478810387355e-24)

There seems to be statistically significance among duration errors of these models. According to the results of Conover's test, mdn_mix4, rmdn_mix4, rmdn_mix16 are not lesser than conventional one.

I also recorded the transitions of loss of these models.
mdn_train

In timelag model, the learning process seems not to work well in MDN model, and over-fitting occurs in RMDN model.

commit 8e9de33
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:27:04 2020 +0900

    Minor fix

commit e86a197
Merge: 6c9d4e9 605a095
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sun Oct 18 21:07:30 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 6c9d4e9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Oct 13 18:18:43 2020 +0900

    Change to use most probable mu as conditional mode.

commit 2b9649c
Merge: fa901d8 9aeaef1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:55:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit fa901d8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:27 2020 +0900

    Minor fix

commit 4869f47
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:05 2020 +0900

    Remove debug print

commit 83cf6de
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:42:34 2020 +0900

    Delete debug print.

commit 6a61a6b
Merge: 5b02542 31b7bf8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:50 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 5b02542
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:03 2020 +0900

    Fix typo

commit 31b7bf8
Merge: 8fc1e4c 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:05:54 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 8fc1e4c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:04:29 2020 +0900

    Change num_gaussians

commit 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:02:54 2020 +0900

    Change RMDN to MDN

commit 2b5e03d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:00:53 2020 +0900

    Fix typo

commit 68aaba5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 22:01:58 2020 +0900

    Fix scaling of sigma

commit 3925221
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 17:21:22 2020 +0900

    Fix to handle predictions without dyanmic_features

commit 2cfc81f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:50:20 2020 +0900

    Change to call multi_stream_mlpg from predict_*

commit fbd40d3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:49:56 2020 +0900

    Remove mdn_sample_mode and add mdn_get_most_probable_sigma_and_mu.

commit 4560322
Merge: e4a66e5 4305844
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 17:58:33 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit e4a66e5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 16:50:40 2020 +0900

    Minor fix.

commit e489c82
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:48:21 2020 +0900

    Change num_gaussians from 4 to 2

commit c3aa7e8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:35:36 2020 +0900

    Minor fix.

commit 502cae1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:27:48 2020 +0900

    Correct comments.

commit 8e52754
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:15:00 2020 +0900

    Fix arithmetical bug of mdn_loss

commit e4c299a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 14:54:17 2020 +0900

    Change the caluculation order.

commit 291e808
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:49:24 2020 +0900

    Change MDN to RMDN

commit 4b49d9b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:45:58 2020 +0900

    Add ReLU to RMDN

commit 8699803
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:39:26 2020 +0900

    Change sigma to log_sigma

commit 55feef5
Merge: 68248ac 3a55678
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 02:41:03 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 68248ac
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 01:56:55 2020 +0900

    Add note.

commit 1c4276b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:53:17 2020 +0900

    Change batch_size, nepochs, and models.

commit 587e4e4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:51:33 2020 +0900

    Minor fix

commit 733b35f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:49:37 2020 +0900

    Change to make use of mask.

commit 44b4158
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:37:57 2020 +0900

    Remove Conv1dResnetMDN

commit d273dba
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 23:22:14 2020 +0900

    Change MDN to RMDN

commit 949cefc
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 22:31:58 2020 +0900

    Change RMDN model.

commit 09aec48
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:54:32 2020 +0900

    Minor fix

commit 131d978
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:45:10 2020 +0900

    Add Conv1dResnetMDN

commit dea9c93
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:53:57 2020 +0900

    Remove nn.Softmax for numerical stability.

commit 5e18115
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:50:58 2020 +0900

    Change epoch to 300

commit c8cdc70
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:48:24 2020 +0900

    Change to use mdn_sample instead of mdn_sample_mode

commit 1aae4fd
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:01:58 2020 +0900

    Change to use nn.ReLU() istead of nn.Tanh()

commit cc5ea5b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 01:03:10 2020 +0900

    Fix comment and change not to call forward directly.
@taroushirani
Copy link
Contributor Author

I fixed the bug of nnsvs/bin/synthesis.py which fails to synthesis when label_path and out_wav_path are specified instead of utt_list etc. And I don't mind waiting. I'm in no hurry.

@taroushirani
Copy link
Contributor Author

I have some questions about the implementation of mixture density network.

(1) I changed pi of MDNLayer into the not softmax-ed version for numerical stability and currently it has no mathematical meaning in itself(unless it is softmax-ed by hand). Is it better to change pi into logpi(logged "pi") by adding F.log_softmax to MDNLayer.forward() ?

(2) I found that mdn_loss sometimes goes to nan when num_gaussians is large. In my knowledge, MDN won't work if one of its variance goes to zero and its Gaussian component shrink to a point. Your implementation[1] has the lower limit of log_scale(logged variance) and I guess this is to avoid the collapse of MDN. Is this correct?

(3) In your implementation you use logged version of scale. Is this for numerical stability?

  1. https://github.com/r9y9/wavenet_vocoder/blob/63d3fe0a85a69aa25d80700974fe282c96fb6b65/wavenet_vocoder/mixture.py#L161

@r9y9
Copy link
Collaborator

r9y9 commented Oct 28, 2020

(1) Yes, I think we should apply F.log_softmax to have mixture weights to be consistent with the mathematical formulation.

(3) Yes. Otherwise, the scale would quickly go to zero, especially when the number of Gaussians is large.

(2): The log scale clipping is for stabilizing the training. I recommend using both 1) log-scale parameterization and 2) clipping to improve numerical stability.

commit 514087a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 01:43:37 2020 +0900

    Change to use log_pi and log_sigma instead of pi and sigma.

commit 825a75b
Merge: 8e9de33 a94ebc1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:35:02 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 8e9de33
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:27:04 2020 +0900

    Minor fix

commit e86a197
Merge: 6c9d4e9 605a095
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sun Oct 18 21:07:30 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 6c9d4e9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Oct 13 18:18:43 2020 +0900

    Change to use most probable mu as conditional mode.

commit 2b9649c
Merge: fa901d8 9aeaef1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:55:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit fa901d8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:27 2020 +0900

    Minor fix

commit 4869f47
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:05 2020 +0900

    Remove debug print

commit 83cf6de
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:42:34 2020 +0900

    Delete debug print.

commit 6a61a6b
Merge: 5b02542 31b7bf8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:50 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 5b02542
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:03 2020 +0900

    Fix typo

commit 31b7bf8
Merge: 8fc1e4c 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:05:54 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 8fc1e4c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:04:29 2020 +0900

    Change num_gaussians

commit 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:02:54 2020 +0900

    Change RMDN to MDN

commit 2b5e03d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:00:53 2020 +0900

    Fix typo

commit 68aaba5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 22:01:58 2020 +0900

    Fix scaling of sigma

commit 3925221
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 17:21:22 2020 +0900

    Fix to handle predictions without dyanmic_features

commit 2cfc81f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:50:20 2020 +0900

    Change to call multi_stream_mlpg from predict_*

commit fbd40d3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:49:56 2020 +0900

    Remove mdn_sample_mode and add mdn_get_most_probable_sigma_and_mu.

commit 4560322
Merge: e4a66e5 4305844
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 17:58:33 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit e4a66e5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 16:50:40 2020 +0900

    Minor fix.

commit e489c82
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:48:21 2020 +0900

    Change num_gaussians from 4 to 2

commit c3aa7e8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:35:36 2020 +0900

    Minor fix.

commit 502cae1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:27:48 2020 +0900

    Correct comments.

commit 8e52754
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:15:00 2020 +0900

    Fix arithmetical bug of mdn_loss

commit e4c299a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 14:54:17 2020 +0900

    Change the caluculation order.

commit 291e808
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:49:24 2020 +0900

    Change MDN to RMDN

commit 4b49d9b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:45:58 2020 +0900

    Add ReLU to RMDN

commit 8699803
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:39:26 2020 +0900

    Change sigma to log_sigma

commit 55feef5
Merge: 68248ac 3a55678
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 02:41:03 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 68248ac
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 01:56:55 2020 +0900

    Add note.

commit 1c4276b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:53:17 2020 +0900

    Change batch_size, nepochs, and models.

commit 587e4e4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:51:33 2020 +0900

    Minor fix

commit 733b35f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:49:37 2020 +0900

    Change to make use of mask.

commit 44b4158
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:37:57 2020 +0900

    Remove Conv1dResnetMDN

commit d273dba
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 23:22:14 2020 +0900

    Change MDN to RMDN

commit 949cefc
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 22:31:58 2020 +0900

    Change RMDN model.

commit 09aec48
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:54:32 2020 +0900

    Minor fix

commit 131d978
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:45:10 2020 +0900

    Add Conv1dResnetMDN

commit dea9c93
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:53:57 2020 +0900

    Remove nn.Softmax for numerical stability.

commit 5e18115
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:50:58 2020 +0900

    Change epoch to 300

commit c8cdc70
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:48:24 2020 +0900

    Change to use mdn_sample instead of mdn_sample_mode

commit 1aae4fd
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:01:58 2020 +0900

    Change to use nn.ReLU() istead of nn.Tanh()

commit cc5ea5b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 01:03:10 2020 +0900

    Fix comment and change not to call forward directly.
@taroushirani
Copy link
Contributor Author

Thank you for your rapid comment. I changed to use log_pi and log_sigma instead of pi and sigma as you recommended.

And I have another question. I'm afraid that torch.distributions.Normal.log_prob(x) may return -inf when the possibility of x is zero. Is there any need to clamp the result of log_prob with the same way?

@taroushirani
Copy link
Contributor Author

torch.distributions.Normal.log_prob(x) may return -inf even if the possibility is very small but not zero, due to the precision of torch.tensor(pytorch/pytorch#12269)

@r9y9
Copy link
Collaborator

r9y9 commented Oct 29, 2020

I think it's a common issue. Adding a clamp should fix the numerical stability.

commit 86513fb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:11:21 2020 +0900

    Fix comment

commit 56e96c2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:05:21 2020 +0900

    Remove comment

commit 3d2c046
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:04:43 2020 +0900

    Remove lower limit of log_prob

commit bc1eef0
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 23:55:30 2020 +0900

    Fix variables

commit 2d9c35c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 22:45:03 2020 +0900

    Add comments

commit 37156eb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 21:10:16 2020 +0900

    Add lower limit to torch.distributions.Normal.log_prob

commit 17c9ac8
Merge: 514087a 1251bb2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 02:31:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 514087a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 01:43:37 2020 +0900

    Change to use log_pi and log_sigma instead of pi and sigma.

commit 825a75b
Merge: 8e9de33 a94ebc1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:35:02 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 8e9de33
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:27:04 2020 +0900

    Minor fix

commit e86a197
Merge: 6c9d4e9 605a095
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sun Oct 18 21:07:30 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 6c9d4e9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Oct 13 18:18:43 2020 +0900

    Change to use most probable mu as conditional mode.

commit 2b9649c
Merge: fa901d8 9aeaef1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:55:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit fa901d8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:27 2020 +0900

    Minor fix

commit 4869f47
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:05 2020 +0900

    Remove debug print

commit 83cf6de
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:42:34 2020 +0900

    Delete debug print.

commit 6a61a6b
Merge: 5b02542 31b7bf8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:50 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 5b02542
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:03 2020 +0900

    Fix typo

commit 31b7bf8
Merge: 8fc1e4c 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:05:54 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 8fc1e4c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:04:29 2020 +0900

    Change num_gaussians

commit 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:02:54 2020 +0900

    Change RMDN to MDN

commit 2b5e03d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:00:53 2020 +0900

    Fix typo

commit 68aaba5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 22:01:58 2020 +0900

    Fix scaling of sigma

commit 3925221
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 17:21:22 2020 +0900

    Fix to handle predictions without dyanmic_features

commit 2cfc81f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:50:20 2020 +0900

    Change to call multi_stream_mlpg from predict_*

commit fbd40d3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:49:56 2020 +0900

    Remove mdn_sample_mode and add mdn_get_most_probable_sigma_and_mu.

commit 4560322
Merge: e4a66e5 4305844
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 17:58:33 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit e4a66e5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 16:50:40 2020 +0900

    Minor fix.

commit e489c82
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:48:21 2020 +0900

    Change num_gaussians from 4 to 2

commit c3aa7e8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:35:36 2020 +0900

    Minor fix.

commit 502cae1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:27:48 2020 +0900

    Correct comments.

commit 8e52754
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:15:00 2020 +0900

    Fix arithmetical bug of mdn_loss

commit e4c299a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 14:54:17 2020 +0900

    Change the caluculation order.

commit 291e808
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:49:24 2020 +0900

    Change MDN to RMDN

commit 4b49d9b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:45:58 2020 +0900

    Add ReLU to RMDN

commit 8699803
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:39:26 2020 +0900

    Change sigma to log_sigma

commit 55feef5
Merge: 68248ac 3a55678
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 02:41:03 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 68248ac
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 01:56:55 2020 +0900

    Add note.

commit 1c4276b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:53:17 2020 +0900

    Change batch_size, nepochs, and models.

commit 587e4e4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:51:33 2020 +0900

    Minor fix

commit 733b35f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:49:37 2020 +0900

    Change to make use of mask.

commit 44b4158
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:37:57 2020 +0900

    Remove Conv1dResnetMDN

commit d273dba
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 23:22:14 2020 +0900

    Change MDN to RMDN

commit 949cefc
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 22:31:58 2020 +0900

    Change RMDN model.

commit 09aec48
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:54:32 2020 +0900

    Minor fix

commit 131d978
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:45:10 2020 +0900

    Add Conv1dResnetMDN

commit dea9c93
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:53:57 2020 +0900

    Remove nn.Softmax for numerical stability.

commit 5e18115
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:50:58 2020 +0900

    Change epoch to 300

commit c8cdc70
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:48:24 2020 +0900

    Change to use mdn_sample instead of mdn_sample_mode

commit 1aae4fd
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:01:58 2020 +0900

    Change to use nn.ReLU() istead of nn.Tanh()

commit cc5ea5b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 01:03:10 2020 +0900

    Fix comment and change not to call forward directly.
@taroushirani
Copy link
Contributor Author

Thank you for your comment. I tried to clamp the result of torch.distributions.Normal.log_prob(x) but the numerical instability worsened. I have no idea why this occurred and my codes seems to be numerically unstable yet.

commit f029a95
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:51:53 2020 +0900

    Minor fix

commit 0c8eab8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:50:18 2020 +0900

    minor fix

commit 3c053bf
Merge: 86513fb b2c426f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:29:27 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 86513fb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:11:21 2020 +0900

    Fix comment

commit 56e96c2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:05:21 2020 +0900

    Remove comment

commit 3d2c046
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:04:43 2020 +0900

    Remove lower limit of log_prob

commit bc1eef0
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 23:55:30 2020 +0900

    Fix variables

commit 2d9c35c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 22:45:03 2020 +0900

    Add comments

commit 37156eb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 21:10:16 2020 +0900

    Add lower limit to torch.distributions.Normal.log_prob

commit 17c9ac8
Merge: 514087a 1251bb2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 02:31:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 514087a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 01:43:37 2020 +0900

    Change to use log_pi and log_sigma instead of pi and sigma.

commit 825a75b
Merge: 8e9de33 a94ebc1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:35:02 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 8e9de33
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:27:04 2020 +0900

    Minor fix

commit e86a197
Merge: 6c9d4e9 605a095
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sun Oct 18 21:07:30 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 6c9d4e9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Oct 13 18:18:43 2020 +0900

    Change to use most probable mu as conditional mode.

commit 2b9649c
Merge: fa901d8 9aeaef1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:55:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit fa901d8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:27 2020 +0900

    Minor fix

commit 4869f47
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:05 2020 +0900

    Remove debug print

commit 83cf6de
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:42:34 2020 +0900

    Delete debug print.

commit 6a61a6b
Merge: 5b02542 31b7bf8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:50 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 5b02542
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:03 2020 +0900

    Fix typo

commit 31b7bf8
Merge: 8fc1e4c 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:05:54 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 8fc1e4c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:04:29 2020 +0900

    Change num_gaussians

commit 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:02:54 2020 +0900

    Change RMDN to MDN

commit 2b5e03d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:00:53 2020 +0900

    Fix typo

commit 68aaba5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 22:01:58 2020 +0900

    Fix scaling of sigma

commit 3925221
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 17:21:22 2020 +0900

    Fix to handle predictions without dyanmic_features

commit 2cfc81f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:50:20 2020 +0900

    Change to call multi_stream_mlpg from predict_*

commit fbd40d3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:49:56 2020 +0900

    Remove mdn_sample_mode and add mdn_get_most_probable_sigma_and_mu.

commit 4560322
Merge: e4a66e5 4305844
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 17:58:33 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit e4a66e5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 16:50:40 2020 +0900

    Minor fix.

commit e489c82
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:48:21 2020 +0900

    Change num_gaussians from 4 to 2

commit c3aa7e8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:35:36 2020 +0900

    Minor fix.

commit 502cae1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:27:48 2020 +0900

    Correct comments.

commit 8e52754
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:15:00 2020 +0900

    Fix arithmetical bug of mdn_loss

commit e4c299a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 14:54:17 2020 +0900

    Change the caluculation order.

commit 291e808
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:49:24 2020 +0900

    Change MDN to RMDN

commit 4b49d9b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:45:58 2020 +0900

    Add ReLU to RMDN

commit 8699803
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:39:26 2020 +0900

    Change sigma to log_sigma

commit 55feef5
Merge: 68248ac 3a55678
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 02:41:03 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 68248ac
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 01:56:55 2020 +0900

    Add note.

commit 1c4276b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:53:17 2020 +0900

    Change batch_size, nepochs, and models.

commit 587e4e4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:51:33 2020 +0900

    Minor fix

commit 733b35f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:49:37 2020 +0900

    Change to make use of mask.

commit 44b4158
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:37:57 2020 +0900

    Remove Conv1dResnetMDN

commit d273dba
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 23:22:14 2020 +0900

    Change MDN to RMDN

commit 949cefc
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 22:31:58 2020 +0900

    Change RMDN model.

commit 09aec48
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:54:32 2020 +0900

    Minor fix

commit 131d978
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:45:10 2020 +0900

    Add Conv1dResnetMDN

commit dea9c93
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:53:57 2020 +0900

    Remove nn.Softmax for numerical stability.

commit 5e18115
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:50:58 2020 +0900

    Change epoch to 300

commit c8cdc70
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:48:24 2020 +0900

    Change to use mdn_sample instead of mdn_sample_mode

commit 1aae4fd
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:01:58 2020 +0900

    Change to use nn.ReLU() istead of nn.Tanh()

commit cc5ea5b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 01:03:10 2020 +0900

    Fix comment and change not to call forward directly.
@r9y9
Copy link
Collaborator

r9y9 commented Oct 30, 2020

Umm. I will also look into the issue this weekend!

@taroushirani
Copy link
Contributor Author

taroushirani commented Oct 30, 2020

I added torch.autograd.set_detect_anomaly(True) to nnsvs/bin/train.py and I found that the back propagation of torch.logsumpexp(=LogsumexpBackward) returned nan.

In my knowledge, weight coefficient pi must be between 0 and 1 due to the nature of the mixture density network, and this can apply to torch.distributions.Normal.

-inf < log_pi < 0
-inf < torch.distributions.Normal.log_prob(y) < 0

So the summation of them must be between -inf and 0.

If x can be written as x = (x_1, x_2,...,x_n) the partial derivative of logsumexp(x) (d logsumexp(x) /dx_i) is 1/(sum exp(x)) * exp(x_i).
So if x = -inf, the back propagation of logsumexp(x) means division of 0 by 0 and will return nan.

This may be solved by setting lower limits to all logged values. (I thought F.log_softmax would be implemented with consideration of such a situation like this, but merely clamping log_pi solved my problem...)

commit 63a6f87
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 19:15:21 2020 +0900

    Add clamping log_pi and and torch.distributions.Normal.log_prob.

commit 09a1f11
Merge: f029a95 52168d2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:56:44 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit f029a95
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:51:53 2020 +0900

    Minor fix

commit 0c8eab8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:50:18 2020 +0900

    minor fix

commit 3c053bf
Merge: 86513fb b2c426f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:29:27 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 86513fb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:11:21 2020 +0900

    Fix comment

commit 56e96c2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:05:21 2020 +0900

    Remove comment

commit 3d2c046
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:04:43 2020 +0900

    Remove lower limit of log_prob

commit bc1eef0
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 23:55:30 2020 +0900

    Fix variables

commit 2d9c35c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 22:45:03 2020 +0900

    Add comments

commit 37156eb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 21:10:16 2020 +0900

    Add lower limit to torch.distributions.Normal.log_prob

commit 17c9ac8
Merge: 514087a 1251bb2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 02:31:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 514087a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 01:43:37 2020 +0900

    Change to use log_pi and log_sigma instead of pi and sigma.

commit 825a75b
Merge: 8e9de33 a94ebc1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:35:02 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 8e9de33
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:27:04 2020 +0900

    Minor fix

commit e86a197
Merge: 6c9d4e9 605a095
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sun Oct 18 21:07:30 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 6c9d4e9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Oct 13 18:18:43 2020 +0900

    Change to use most probable mu as conditional mode.

commit 2b9649c
Merge: fa901d8 9aeaef1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:55:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit fa901d8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:27 2020 +0900

    Minor fix

commit 4869f47
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:05 2020 +0900

    Remove debug print

commit 83cf6de
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:42:34 2020 +0900

    Delete debug print.

commit 6a61a6b
Merge: 5b02542 31b7bf8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:50 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 5b02542
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:03 2020 +0900

    Fix typo

commit 31b7bf8
Merge: 8fc1e4c 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:05:54 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 8fc1e4c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:04:29 2020 +0900

    Change num_gaussians

commit 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:02:54 2020 +0900

    Change RMDN to MDN

commit 2b5e03d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:00:53 2020 +0900

    Fix typo

commit 68aaba5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 22:01:58 2020 +0900

    Fix scaling of sigma

commit 3925221
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 17:21:22 2020 +0900

    Fix to handle predictions without dyanmic_features

commit 2cfc81f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:50:20 2020 +0900

    Change to call multi_stream_mlpg from predict_*

commit fbd40d3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:49:56 2020 +0900

    Remove mdn_sample_mode and add mdn_get_most_probable_sigma_and_mu.

commit 4560322
Merge: e4a66e5 4305844
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 17:58:33 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit e4a66e5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 16:50:40 2020 +0900

    Minor fix.

commit e489c82
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:48:21 2020 +0900

    Change num_gaussians from 4 to 2

commit c3aa7e8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:35:36 2020 +0900

    Minor fix.

commit 502cae1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:27:48 2020 +0900

    Correct comments.

commit 8e52754
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:15:00 2020 +0900

    Fix arithmetical bug of mdn_loss

commit e4c299a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 14:54:17 2020 +0900

    Change the caluculation order.

commit 291e808
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:49:24 2020 +0900

    Change MDN to RMDN

commit 4b49d9b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:45:58 2020 +0900

    Add ReLU to RMDN

commit 8699803
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:39:26 2020 +0900

    Change sigma to log_sigma

commit 55feef5
Merge: 68248ac 3a55678
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 02:41:03 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 68248ac
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 01:56:55 2020 +0900

    Add note.

commit 1c4276b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:53:17 2020 +0900

    Change batch_size, nepochs, and models.

commit 587e4e4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:51:33 2020 +0900

    Minor fix

commit 733b35f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:49:37 2020 +0900

    Change to make use of mask.

commit 44b4158
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:37:57 2020 +0900

    Remove Conv1dResnetMDN

commit d273dba
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 23:22:14 2020 +0900

    Change MDN to RMDN

commit 949cefc
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 22:31:58 2020 +0900

    Change RMDN model.

commit 09aec48
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:54:32 2020 +0900

    Minor fix

commit 131d978
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:45:10 2020 +0900

    Add Conv1dResnetMDN

commit dea9c93
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:53:57 2020 +0900

    Remove nn.Softmax for numerical stability.

commit 5e18115
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:50:58 2020 +0900

    Change epoch to 300

commit c8cdc70
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:48:24 2020 +0900

    Change to use mdn_sample instead of mdn_sample_mode

commit 1aae4fd
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:01:58 2020 +0900

    Change to use nn.ReLU() istead of nn.Tanh()

commit cc5ea5b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 01:03:10 2020 +0900

    Fix comment and change not to call forward directly.
@r9y9
Copy link
Collaborator

r9y9 commented Oct 31, 2020

Hi, I am going to look into this very soon, hopefully tonight or tomorrow. I will first fix #14 and refactor recipes to reduce dup across recipes. Then, I will review the PR and suggest some changes to make it into good shape. Thanks for your patience!

@r9y9 r9y9 mentioned this pull request Oct 31, 2020
40 tasks
Copy link
Collaborator

@r9y9 r9y9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all, thank you for your great effort! Overall it looks very good. I tried the PR locally and it worked also well. Please see the individual comments to make the code better.

For numerical instability, I cannot reproduce the issues locally. I tried to uncomment some of the clamp operations, but it just worked okay. If you can provide me detailed steps to reproduce, I can look into it more carefully.

For the commit history, it would be very helpful if you cleaned it up (maybe using git rebase?), so that I can review it easily. That said, I understand using git is a bit difficult (even for me!). I am okay if you happen to mess up the commit history. In that case, I can run git rebase when I merge the PR if necessary.

Many thanks!! I am looking forward to getting the MDN feature into the master.

@@ -0,0 +1,241 @@
#!/bin/bash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider following #25 and #26 to avoid a dup.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted the duplication in the latest commit.

Comment on lines 141 to 144
model.netG._target_=nnsvs.model.MDN \
model.netG.hidden_dim=1024 \
model.netG.num_layers=4 \
+model.netG.num_gaussians=$num_gaussians \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted the duplication in the latest commit.

Comment on lines 163 to 167
model.netG._target_=nnsvs.model.MDN \
model.netG.hidden_dim=1024 \
model.netG.num_layers=4 \
+model.netG.num_gaussians=$num_gaussians \
~model.netG.bidirectional=True \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above. Also, tabs and whitespaces are mixed. Please use whitespace for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted the duplication in the latest commit.

Comment on lines 186 to 189
model.netG._target_=nnsvs.model.MDN \
model.netG.hidden_dim=1024 \
model.netG.num_layers=4 \
+model.netG.num_gaussians=$num_gaussians \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted the duplication in the latest commit.

@@ -0,0 +1,215 @@
# coding: utf-8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is a dup. Please use a symlink instead, or extend the existing 00-svs-world recipe with external config files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to use symlink in the latest commit.

Comment on lines 7 to 8
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'nnsvs'))
import mdn
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the first line is unnecessary. Please consider replacing the second line with from nnsvs import mdn

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed import directive as you recommended in the latest commit.

out = multi_stream_mlpg(
out, scaler.var_, windows, model_config.stream_sizes,
model_config.has_dynamic_features)
if model.prediction_type == "probabilistic":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider changing this like:

if not model.is_deterministic() or if model.prediction_type() == ENUM_VALUE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to use predictin_type() of BaseModel in the latest commit.

nnsvs/gen.py Outdated
# De-normalization and rounding
lag = np.round(timelag_out_scaler.inverse_transform(y.data.numpy()))
# Run model
if timelag_model.prediction_type == "probabilistic":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to use predictin_type() of BaseModel in the latest commit.

nnsvs/gen.py Outdated

# Apply denormalization
pred_durations = duration_out_scaler.inverse_transform(pred_durations)
if duration_model.prediction_type == "probabilistic":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to use predictin_type() of BaseModel in the latest commit.

nnsvs/gen.py Outdated

# Apply denormalization
pred_acoustic = acoustic_out_scaler.inverse_transform(pred_acoustic)
if acoustic_model.prediction_type == "probabilistic":
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to use predictin_type() of BaseModel in the latest commit.

commit b53bea4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:12:26 2020 +0900

    Delete debug print

commit 54b80a9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:06:43 2020 +0900

    Change to call prediction_type correctly.

commit 4736dbe
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:56:38 2020 +0900

    Minor fix

commit a953daf
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:32:11 2020 +0900

    Delete wrong README.md

commit 68cad87
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:30:50 2020 +0900

    Fix wrong symlink

commit 8c42416
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:26:50 2020 +0900

    Split clamping values

commit e5e5f43
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:21:46 2020 +0900

    Follow google's style of docstring

commit c98b9cb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:21:31 2020 +0900

    Add user defined conf of hydra

commit 181412d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:20:44 2020 +0900

    Revet deletion of unnecessary values

commit 7e6a175
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:19:49 2020 +0900

    Use ENUM type instead of str to specify the prediction type

commit e491de8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:19:00 2020 +0900

    Use data_prep.py of 00-svs-world.

commit a743943
Merge: 5dfedd1 25c9f01
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 21:41:34 2020 +0900

    Merge branch 'master' into mdn_dev

commit 25c9f01
Merge: 4d90dbb ffa9fa6
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Mon Nov 2 16:33:43 2020 +0900

    Merge pull request nnsvs#28 from r9y9/fix-pitch-diff-features

    hed: Fix JP pitch diff features

commit ffa9fa6
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Mon Nov 2 16:14:28 2020 +0900

    hed: Fix JP pitch diff features

    ref r9y9/nnmnkwii#109

commit 4d90dbb
Merge: c3dd805 ce87053
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Mon Nov 2 00:48:58 2020 +0900

    Merge pull request nnsvs#27 from r9y9/basemodel

    Add BaseModel interface

commit ce87053
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Mon Nov 2 00:01:15 2020 +0900

    Add BaseModel interface

    and add inference method in case we want to run different operations
    for training and inferente time (e.g., shallow AR)

commit 5dfedd1
Merge: 63a6f87 c3dd805
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 00:00:32 2020 +0900

    Merge branch 'master' into mdn_dev

commit c3dd805
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sun Nov 1 01:25:54 2020 +0900

    Add python docstring style in README

commit caefa10
Merge: 91a1788 867e588
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 21:55:19 2020 +0900

    Merge pull request nnsvs#26 from r9y9/hydra-config-dir

    Recipes: allow users to have custom model configs in a recipe level

commit 867e588
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 21:45:05 2020 +0900

    Fix README

commit 065c5ac
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 21:43:31 2020 +0900

    recipes: add an example on how to use custom model configs in a recipe

commit a00734a
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 21:35:28 2020 +0900

    recipes: allow users to control models by specifying thier configs

    without manually editing nnsvs/bin/conf/train/model/*.yaml

    finally fixes nnsvs#14

    Thanks the hydra authors!

commit 92d3eaa
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 21:32:26 2020 +0900

    train: rename config names

commit db85a6e
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 21:22:54 2020 +0900

    hydra: add --config-dir for train_*.sh

commit c402230
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 21:14:46 2020 +0900

    rm old dirs

commit 91a1788
Merge: 9143538 50ec407
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 21:11:39 2020 +0900

    Merge pull request nnsvs#25 from r9y9/recipes-remove-dup

    Recipe refactors

commit 50ec407
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 20:59:47 2020 +0900

    Recipe refactors

    - made common scripts and removed the most of duplicated scripts
    - put the common hed file to egs/_common/hed
    - renamed utils to local following kaldi

commit 9143538
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 19:32:08 2020 +0900

    Update gitignore

commit 63f44d3
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 19:30:36 2020 +0900

    Fix traling spaces

commit 28e2f9f
Merge: 7d9e184 6aeedf7
Author: Ryuichi Yamamoto <zryuichi@gmail.com>
Date:   Sat Oct 31 19:16:15 2020 +0900

    Merge pull request nnsvs#23 from taroushirani/detect_anomaly_pr

    use_detect_anomaly feature

commit 6aeedf7
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 20:18:24 2020 +0900

    Squashed commit of the following:

    commit 7bcd463
    Author: Tarou Shirani <taroushirani@gmail.com>
    Date:   Fri Oct 30 20:14:35 2020 +0900

        Add use_detect_anomaly feature

commit 63a6f87
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 19:15:21 2020 +0900

    Add clamping log_pi and and torch.distributions.Normal.log_prob.

commit 09a1f11
Merge: f029a95 52168d2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:56:44 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit f029a95
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:51:53 2020 +0900

    Minor fix

commit 0c8eab8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:50:18 2020 +0900

    minor fix

commit 3c053bf
Merge: 86513fb b2c426f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:29:27 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 86513fb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:11:21 2020 +0900

    Fix comment

commit 56e96c2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:05:21 2020 +0900

    Remove comment

commit 3d2c046
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:04:43 2020 +0900

    Remove lower limit of log_prob

commit bc1eef0
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 23:55:30 2020 +0900

    Fix variables

commit 2d9c35c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 22:45:03 2020 +0900

    Add comments

commit 37156eb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 21:10:16 2020 +0900

    Add lower limit to torch.distributions.Normal.log_prob

commit 17c9ac8
Merge: 514087a 1251bb2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 02:31:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 514087a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 01:43:37 2020 +0900

    Change to use log_pi and log_sigma instead of pi and sigma.

commit 825a75b
Merge: 8e9de33 a94ebc1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:35:02 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 8e9de33
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:27:04 2020 +0900

    Minor fix

commit e86a197
Merge: 6c9d4e9 605a095
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sun Oct 18 21:07:30 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 6c9d4e9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Oct 13 18:18:43 2020 +0900

    Change to use most probable mu as conditional mode.

commit 2b9649c
Merge: fa901d8 9aeaef1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:55:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit fa901d8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:27 2020 +0900

    Minor fix

commit 4869f47
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:05 2020 +0900

    Remove debug print

commit 83cf6de
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:42:34 2020 +0900

    Delete debug print.

commit 6a61a6b
Merge: 5b02542 31b7bf8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:50 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 5b02542
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:03 2020 +0900

    Fix typo

commit 31b7bf8
Merge: 8fc1e4c 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:05:54 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 8fc1e4c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:04:29 2020 +0900

    Change num_gaussians

commit 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:02:54 2020 +0900

    Change RMDN to MDN

commit 2b5e03d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:00:53 2020 +0900

    Fix typo

commit 68aaba5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 22:01:58 2020 +0900

    Fix scaling of sigma

commit 3925221
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 17:21:22 2020 +0900

    Fix to handle predictions without dyanmic_features

commit 2cfc81f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:50:20 2020 +0900

    Change to call multi_stream_mlpg from predict_*

commit fbd40d3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:49:56 2020 +0900

    Remove mdn_sample_mode and add mdn_get_most_probable_sigma_and_mu.

commit 4560322
Merge: e4a66e5 4305844
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 17:58:33 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit e4a66e5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 16:50:40 2020 +0900

    Minor fix.

commit e489c82
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:48:21 2020 +0900

    Change num_gaussians from 4 to 2

commit c3aa7e8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:35:36 2020 +0900

    Minor fix.

commit 502cae1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:27:48 2020 +0900

    Correct comments.

commit 8e52754
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:15:00 2020 +0900

    Fix arithmetical bug of mdn_loss

commit e4c299a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 14:54:17 2020 +0900

    Change the caluculation order.

commit 291e808
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:49:24 2020 +0900

    Change MDN to RMDN

commit 4b49d9b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:45:58 2020 +0900

    Add ReLU to RMDN

commit 8699803
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:39:26 2020 +0900

    Change sigma to log_sigma

commit 55feef5
Merge: 68248ac 3a55678
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 02:41:03 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 68248ac
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 01:56:55 2020 +0900

    Add note.

commit 1c4276b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:53:17 2020 +0900

    Change batch_size, nepochs, and models.

commit 587e4e4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:51:33 2020 +0900

    Minor fix

commit 733b35f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:49:37 2020 +0900

    Change to make use of mask.

commit 44b4158
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:37:57 2020 +0900

    Remove Conv1dResnetMDN

commit d273dba
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 23:22:14 2020 +0900

    Change MDN to RMDN

commit 949cefc
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 22:31:58 2020 +0900

    Change RMDN model.

commit 09aec48
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:54:32 2020 +0900

    Minor fix

commit 131d978
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:45:10 2020 +0900

    Add Conv1dResnetMDN

commit dea9c93
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:53:57 2020 +0900

    Remove nn.Softmax for numerical stability.

commit 5e18115
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:50:58 2020 +0900

    Change epoch to 300

commit c8cdc70
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:48:24 2020 +0900

    Change to use mdn_sample instead of mdn_sample_mode

commit 1aae4fd
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:01:58 2020 +0900

    Change to use nn.ReLU() istead of nn.Tanh()

commit cc5ea5b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 01:03:10 2020 +0900

    Fix comment and change not to call forward directly.
commit ca446a9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:53:27 2020 +0900

    Fix import directive

commit 14370a5
Merge: b53bea4 11088a1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:51:35 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit b53bea4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:12:26 2020 +0900

    Delete debug print

commit 54b80a9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:06:43 2020 +0900

    Change to call prediction_type correctly.

commit 4736dbe
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:56:38 2020 +0900

    Minor fix

commit a953daf
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:32:11 2020 +0900

    Delete wrong README.md

commit 68cad87
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:30:50 2020 +0900

    Fix wrong symlink

commit 8c42416
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:26:50 2020 +0900

    Split clamping values

commit e5e5f43
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:21:46 2020 +0900

    Follow google's style of docstring

commit c98b9cb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:21:31 2020 +0900

    Add user defined conf of hydra

commit 181412d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:20:44 2020 +0900

    Revet deletion of unnecessary values

commit 7e6a175
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:19:49 2020 +0900

    Use ENUM type instead of str to specify the prediction type

commit e491de8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:19:00 2020 +0900

    Use data_prep.py of 00-svs-world.

commit a743943
Merge: 5dfedd1 25c9f01
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 21:41:34 2020 +0900

    Merge branch 'master' into mdn_dev

commit 5dfedd1
Merge: 63a6f87 c3dd805
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 00:00:32 2020 +0900

    Merge branch 'master' into mdn_dev

commit 63a6f87
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 19:15:21 2020 +0900

    Add clamping log_pi and and torch.distributions.Normal.log_prob.

commit 09a1f11
Merge: f029a95 52168d2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:56:44 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit f029a95
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:51:53 2020 +0900

    Minor fix

commit 0c8eab8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:50:18 2020 +0900

    minor fix

commit 3c053bf
Merge: 86513fb b2c426f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:29:27 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 86513fb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:11:21 2020 +0900

    Fix comment

commit 56e96c2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:05:21 2020 +0900

    Remove comment

commit 3d2c046
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:04:43 2020 +0900

    Remove lower limit of log_prob

commit bc1eef0
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 23:55:30 2020 +0900

    Fix variables

commit 2d9c35c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 22:45:03 2020 +0900

    Add comments

commit 37156eb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 21:10:16 2020 +0900

    Add lower limit to torch.distributions.Normal.log_prob

commit 17c9ac8
Merge: 514087a 1251bb2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 02:31:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 514087a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 01:43:37 2020 +0900

    Change to use log_pi and log_sigma instead of pi and sigma.

commit 825a75b
Merge: 8e9de33 a94ebc1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:35:02 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 8e9de33
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:27:04 2020 +0900

    Minor fix

commit e86a197
Merge: 6c9d4e9 605a095
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sun Oct 18 21:07:30 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 6c9d4e9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Oct 13 18:18:43 2020 +0900

    Change to use most probable mu as conditional mode.

commit 2b9649c
Merge: fa901d8 9aeaef1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:55:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit fa901d8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:27 2020 +0900

    Minor fix

commit 4869f47
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:05 2020 +0900

    Remove debug print

commit 83cf6de
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:42:34 2020 +0900

    Delete debug print.

commit 6a61a6b
Merge: 5b02542 31b7bf8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:50 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 5b02542
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:03 2020 +0900

    Fix typo

commit 31b7bf8
Merge: 8fc1e4c 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:05:54 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 8fc1e4c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:04:29 2020 +0900

    Change num_gaussians

commit 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:02:54 2020 +0900

    Change RMDN to MDN

commit 2b5e03d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:00:53 2020 +0900

    Fix typo

commit 68aaba5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 22:01:58 2020 +0900

    Fix scaling of sigma

commit 3925221
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 17:21:22 2020 +0900

    Fix to handle predictions without dyanmic_features

commit 2cfc81f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:50:20 2020 +0900

    Change to call multi_stream_mlpg from predict_*

commit fbd40d3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:49:56 2020 +0900

    Remove mdn_sample_mode and add mdn_get_most_probable_sigma_and_mu.

commit 4560322
Merge: e4a66e5 4305844
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 17:58:33 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit e4a66e5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 16:50:40 2020 +0900

    Minor fix.

commit e489c82
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:48:21 2020 +0900

    Change num_gaussians from 4 to 2

commit c3aa7e8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:35:36 2020 +0900

    Minor fix.

commit 502cae1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:27:48 2020 +0900

    Correct comments.

commit 8e52754
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:15:00 2020 +0900

    Fix arithmetical bug of mdn_loss

commit e4c299a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 14:54:17 2020 +0900

    Change the caluculation order.

commit 291e808
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:49:24 2020 +0900

    Change MDN to RMDN

commit 4b49d9b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:45:58 2020 +0900

    Add ReLU to RMDN

commit 8699803
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:39:26 2020 +0900

    Change sigma to log_sigma

commit 55feef5
Merge: 68248ac 3a55678
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 02:41:03 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 68248ac
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 01:56:55 2020 +0900

    Add note.

commit 1c4276b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:53:17 2020 +0900

    Change batch_size, nepochs, and models.

commit 587e4e4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:51:33 2020 +0900

    Minor fix

commit 733b35f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:49:37 2020 +0900

    Change to make use of mask.

commit 44b4158
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:37:57 2020 +0900

    Remove Conv1dResnetMDN

commit d273dba
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 23:22:14 2020 +0900

    Change MDN to RMDN

commit 949cefc
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 22:31:58 2020 +0900

    Change RMDN model.

commit 09aec48
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:54:32 2020 +0900

    Minor fix

commit 131d978
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:45:10 2020 +0900

    Add Conv1dResnetMDN

commit dea9c93
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:53:57 2020 +0900

    Remove nn.Softmax for numerical stability.

commit 5e18115
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:50:58 2020 +0900

    Change epoch to 300

commit c8cdc70
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:48:24 2020 +0900

    Change to use mdn_sample instead of mdn_sample_mode

commit 1aae4fd
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:01:58 2020 +0900

    Change to use nn.ReLU() istead of nn.Tanh()

commit cc5ea5b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 01:03:10 2020 +0900

    Fix comment and change not to call forward directly.
Copy link
Collaborator

@r9y9 r9y9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is getting in a good shape! I left a few minor comments. Once the minor issues are addressed, I am going to merge the PR.

nnsvs/model.py Outdated
@@ -74,14 +70,52 @@ def __init__(self, in_dim, hidden_dim, out_dim, num_layers=1, bidirectional=True
super(LSTMRNN, self).__init__()
self.hidden_dim = hidden_dim
self.num_layers = num_layers
self.relu = nn.ReLU()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is not used anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted unnecessary ReLU in the latest commit.

@@ -25,7 +24,6 @@ def __init__(self, dim, dilation=1):
WNConv1d(dim, dim, kernel_size=1),
)
self.shortcut = WNConv1d(dim, dim, kernel_size=1)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: could you keep the new line here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added new line there in the latest commit.

@@ -46,7 +44,6 @@ def __init__(self, in_dim, hidden_dim, out_dim, num_layers=4, dropout=0.0):
]

self.model = nn.Sequential(*model)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added new line there in the latest commit.

@@ -60,7 +57,6 @@ def __init__(self, in_dim, hidden_dim, out_dim, num_layers=2, dropout=0.0):
self.last_linear = nn.Linear(hidden_dim, out_dim)
self.relu = nn.ReLU()
self.dropout = nn.Dropout(dropout)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added new line there in the latest commit.

self.num_direction = 2 if bidirectional else 1
self.lstm = nn.LSTM(in_dim, hidden_dim, num_layers,
bidirectional=bidirectional, batch_first=True, dropout=dropout)
self.hidden2out = nn.Linear(self.num_direction*self.hidden_dim, out_dim)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added new line there in the latest commit.

commit 6fe86b4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 01:39:26 2020 +0900

    Add spaces and delete unnnecessary ReLU

commit cdebfb6
Merge: ca446a9 b707a5f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 01:00:17 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit ca446a9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:53:27 2020 +0900

    Fix import directive

commit 14370a5
Merge: b53bea4 11088a1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:51:35 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit b53bea4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:12:26 2020 +0900

    Delete debug print

commit 54b80a9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Nov 3 00:06:43 2020 +0900

    Change to call prediction_type correctly.

commit 4736dbe
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:56:38 2020 +0900

    Minor fix

commit a953daf
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:32:11 2020 +0900

    Delete wrong README.md

commit 68cad87
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:30:50 2020 +0900

    Fix wrong symlink

commit 8c42416
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:26:50 2020 +0900

    Split clamping values

commit e5e5f43
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:21:46 2020 +0900

    Follow google's style of docstring

commit c98b9cb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:21:31 2020 +0900

    Add user defined conf of hydra

commit 181412d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:20:44 2020 +0900

    Revet deletion of unnecessary values

commit 7e6a175
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:19:49 2020 +0900

    Use ENUM type instead of str to specify the prediction type

commit e491de8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 23:19:00 2020 +0900

    Use data_prep.py of 00-svs-world.

commit a743943
Merge: 5dfedd1 25c9f01
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 21:41:34 2020 +0900

    Merge branch 'master' into mdn_dev

commit 5dfedd1
Merge: 63a6f87 c3dd805
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Nov 2 00:00:32 2020 +0900

    Merge branch 'master' into mdn_dev

commit 63a6f87
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 19:15:21 2020 +0900

    Add clamping log_pi and and torch.distributions.Normal.log_prob.

commit 09a1f11
Merge: f029a95 52168d2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:56:44 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit f029a95
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:51:53 2020 +0900

    Minor fix

commit 0c8eab8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:50:18 2020 +0900

    minor fix

commit 3c053bf
Merge: 86513fb b2c426f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:29:27 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 86513fb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:11:21 2020 +0900

    Fix comment

commit 56e96c2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:05:21 2020 +0900

    Remove comment

commit 3d2c046
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Fri Oct 30 00:04:43 2020 +0900

    Remove lower limit of log_prob

commit bc1eef0
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 23:55:30 2020 +0900

    Fix variables

commit 2d9c35c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 22:45:03 2020 +0900

    Add comments

commit 37156eb
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 21:10:16 2020 +0900

    Add lower limit to torch.distributions.Normal.log_prob

commit 17c9ac8
Merge: 514087a 1251bb2
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 02:31:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 514087a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 29 01:43:37 2020 +0900

    Change to use log_pi and log_sigma instead of pi and sigma.

commit 825a75b
Merge: 8e9de33 a94ebc1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:35:02 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 8e9de33
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Mon Oct 19 19:27:04 2020 +0900

    Minor fix

commit e86a197
Merge: 6c9d4e9 605a095
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Sun Oct 18 21:07:30 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 6c9d4e9
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Oct 13 18:18:43 2020 +0900

    Change to use most probable mu as conditional mode.

commit 2b9649c
Merge: fa901d8 9aeaef1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:55:34 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit fa901d8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:27 2020 +0900

    Minor fix

commit 4869f47
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:53:05 2020 +0900

    Remove debug print

commit 83cf6de
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:42:34 2020 +0900

    Delete debug print.

commit 6a61a6b
Merge: 5b02542 31b7bf8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:50 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 5b02542
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:25:03 2020 +0900

    Fix typo

commit 31b7bf8
Merge: 8fc1e4c 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:05:54 2020 +0900

    Merge branch 'mdn_dev' of https://github.com/taroushirani/nnsvs into mdn_dev

commit 8fc1e4c
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:04:29 2020 +0900

    Change num_gaussians

commit 8455087
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:02:54 2020 +0900

    Change RMDN to MDN

commit 2b5e03d
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 8 01:00:53 2020 +0900

    Fix typo

commit 68aaba5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 22:01:58 2020 +0900

    Fix scaling of sigma

commit 3925221
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 17:21:22 2020 +0900

    Fix to handle predictions without dyanmic_features

commit 2cfc81f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:50:20 2020 +0900

    Change to call multi_stream_mlpg from predict_*

commit fbd40d3
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Oct 7 16:49:56 2020 +0900

    Remove mdn_sample_mode and add mdn_get_most_probable_sigma_and_mu.

commit 4560322
Merge: e4a66e5 4305844
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 17:58:33 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit e4a66e5
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 16:50:40 2020 +0900

    Minor fix.

commit e489c82
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:48:21 2020 +0900

    Change num_gaussians from 4 to 2

commit c3aa7e8
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:35:36 2020 +0900

    Minor fix.

commit 502cae1
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:27:48 2020 +0900

    Correct comments.

commit 8e52754
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 15:15:00 2020 +0900

    Fix arithmetical bug of mdn_loss

commit e4c299a
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 14:54:17 2020 +0900

    Change the caluculation order.

commit 291e808
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:49:24 2020 +0900

    Change MDN to RMDN

commit 4b49d9b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:45:58 2020 +0900

    Add ReLU to RMDN

commit 8699803
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 09:39:26 2020 +0900

    Change sigma to log_sigma

commit 55feef5
Merge: 68248ac 3a55678
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 02:41:03 2020 +0900

    Merge branch 'mdn_pr' into mdn_dev

commit 68248ac
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 01:56:55 2020 +0900

    Add note.

commit 1c4276b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:53:17 2020 +0900

    Change batch_size, nepochs, and models.

commit 587e4e4
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:51:33 2020 +0900

    Minor fix

commit 733b35f
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:49:37 2020 +0900

    Change to make use of mask.

commit 44b4158
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Thu Oct 1 00:37:57 2020 +0900

    Remove Conv1dResnetMDN

commit d273dba
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 23:22:14 2020 +0900

    Change MDN to RMDN

commit 949cefc
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 22:31:58 2020 +0900

    Change RMDN model.

commit 09aec48
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:54:32 2020 +0900

    Minor fix

commit 131d978
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 19:45:10 2020 +0900

    Add Conv1dResnetMDN

commit dea9c93
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:53:57 2020 +0900

    Remove nn.Softmax for numerical stability.

commit 5e18115
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Wed Sep 30 17:50:58 2020 +0900

    Change epoch to 300

commit c8cdc70
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:48:24 2020 +0900

    Change to use mdn_sample instead of mdn_sample_mode

commit 1aae4fd
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 20:01:58 2020 +0900

    Change to use nn.ReLU() istead of nn.Tanh()

commit cc5ea5b
Author: Tarou Shirani <taroushirani@gmail.com>
Date:   Tue Sep 29 01:03:10 2020 +0900

    Fix comment and change not to call forward directly.
Copy link
Collaborator

@r9y9 r9y9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's merge and play with it.

@r9y9 r9y9 merged commit 1d7d2ae into nnsvs:master Nov 2, 2020
@r9y9
Copy link
Collaborator

r9y9 commented Nov 2, 2020

Many thanks for your great contribution!!

@taroushirani
Copy link
Contributor Author

Thank you for your code review. I probably fixed all problems you pointed out above.

I met numerical instability when I tried Conv1dResnetMDN(namely Conv1dResnet + MDN). I'll submit PR after MDN is merged.

As far as I know, git rebase re-assign new hash to each commit and make the log straight, but it will destroy the repository which refers to the old hashes. To the amateur eye, I feel "squash merge" is safer than rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants