Helper function to pad a tensor in the time dimension and retain the static depth dimension.
(x, padding_length)
| 16 | import tensorflow as tf |
| 17 | |
| 18 | def pad_in_time(x, padding_length): |
| 19 | """Helper function to pad a tensor in the time dimension and retain the static depth dimension.""" |
| 20 | return tf.pad(x, [[0, 0], [0, padding_length], [0, 0]]) |
| 21 | |
| 22 | |
| 23 | def align_in_time(x, length): |
no outgoing calls
no test coverage detected