From 1312a27ddcd2673b3a29e3c0959940044765fa80 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Wed, 3 Jun 2020 18:21:06 -0400 Subject: [PATCH] more solutions --- README.md | 17 ++++++++++++++++- glow-tts-jaywalnut/glow-tts | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1da2cc5..3b29857 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,22 @@ Fix, <--- HERE ``` -Unroll the double list comprehension. +The above code is flattening a list of lists, + +``` +[[1, 2, 3], [4, 5, 6], [7, 8, 9]] +> >>> pad_shape = [item for sublist in l for item in sublist] +> >>> pad_shape +[1, 2, 3, 4, 5, 6, 7, 8, 9] +``` + +Unroll the double list comprehension. In this particular case, `torch.flatten()` [may work](https://stackoverflow.com/questions/55546873/how-do-i-flatten-a-tensor-in-pytorch/55546907), + +```python + pad_shape = l.flatten() +``` + +*Note: I'm not certain this is correct yet.* Model-specific details diff --git a/glow-tts-jaywalnut/glow-tts b/glow-tts-jaywalnut/glow-tts index 00a482d..c88c81c 160000 --- a/glow-tts-jaywalnut/glow-tts +++ b/glow-tts-jaywalnut/glow-tts @@ -1 +1 @@ -Subproject commit 00a482d06ebbffbd3518a43480cd79e7b47ebbe2 +Subproject commit c88c81c1fe576638bd24aca69ba63810a46fbf3f