mirror of
https://github.com/coqui-ai/TTS.git
synced 2026-07-13 22:09:18 +02:00
9 lines
233 B
Python
9 lines
233 B
Python
import tensorflow as tf
|
|
|
|
|
|
def shape_list(x):
|
|
"""Deal with dynamic shape in tensorflow cleanly."""
|
|
static = x.shape.as_list()
|
|
dynamic = tf.shape(x)
|
|
return [dynamic[i] if s is None else s for i, s in enumerate(static)]
|