Skip to content

Blockwise{Convolve1d} never infers static output shape #1998

@ErikRingen

Description

@ErikRingen

Describe the issue:

pt.signal.convolve1d always produces (None,) output shape, even when both input shapes and the mode are fully known at graph construction time.

Reproducable code example:

import pytensor.tensor as pt

x = pt.vector('x', shape=(61,))
k = pt.vector('k', shape=(10,))

conv = pt.signal.convolve1d(x, k, mode='full')
print(conv.type.shape)  # (None,)  — expected (70,)


bx = pt.matrix('bx', shape=(4, 61))
bk = pt.matrix('bk', shape=(4, 10))
bconv = pt.signal.convolve1d(bx, bk, mode='full')
print(bconv.type.shape)  # (4, None)  — expected (4, 70)

Error message:

PyTensor version information:

  • PyTensor version: 2.38.2 (also confirmed on main at c31183051)
  • Python version: 3.12
  • Operating system: macOS (ARM64)
  • How did you install PyTensor: pixi (conda-forge)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions