Skip to content

Conv1D with dilation and "causal" padding isn't reducing the size of the sequence #8751

Description

@chausies

If you run

x = Input(shape=(seq_length, dim))
y = Conv1D(num_filts, 2, dilation_rate=8, padding="causal")(x)
print(y.shape)

Then the shape printed out will be (?, seq_length, dim), which means the sequence length wasn't changed at all. But isn't this incorrect? Because the dilation makes the effective kernel width of the convolution 9, shouldn't the sequence length of the output be decremented by 8 because the causal kernel needs 9 values to perform its dot product and so doesn't output on the first 8 samples in the sequence?

To clarify, I'm running with an updated tensorflow backend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions