Skip to content

feat: add Conv1D layer #155

Description

@ulises-jeremias

Only Conv2D exists. Conv1D is useful for sequence/time-series data (e.g., IMDB
sentiment classification).

Task

Following the pattern of nn/layers/conv2d.v and nn/internal/conv2d.v:

  1. Add nn/layers/conv1d.v — Conv1D layer (in_channels, out_channels, kernel_size, stride, padding)
  2. Add nn/internal/conv1d.v — CPU forward/backward kernels (im2col 1D or direct loop)
  3. Add Conv1D autograd gate

Verification

  • Conv1D forward matches PyTorch (nn.Conv1d) for same weights
  • Gradient check passes

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