Question about "tf.keras.layers.Conv1DTranspose"

Hello everyone,

In the documentation of “tf.keras.layers.Conv1DTranspose”, the type to calculate the output is depicted.

new_timesteps = ((timesteps - 1) * strides + kernel_size -2 * padding + output_padding)

However, tf.keras.layers.Conv1DTranspose does not accept integer type for “padding” argument.
I would like to pass an integer or a List/Tuple containing the paddings for each dimension.
Is this possible?

Thank you!

Hi @kostasnikif, You can only pass valid and same values to the padding argument. You cannot pass the integer values. valid means no padding. same results in padding with zeros evenly to the left/right or up/down of the input such that output has the same height/width dimension as the input. Thank You.

So why are the provide this formula, while they do not support it?
I mean, it could be sensible to let us choose between “valid”, “same” but at the same time be able to pass an integer as PyTorch does.