3D Convolution
2026/3/9小于 1 分钟
3D Convolution
题面
Implement a program that performs a 3D convolution operation with "valid" 边界(无 padding)。输入为体数据与三维 kernel,均按行优先然后按 depth 展平为一维数组。输出尺寸:output_depth = input_depth - kernel_depth + 1output_rows = input_rows - kernel_rows + 1output_cols = input_cols - kernel_cols + 1
Implementation Requirements
- Use only native features (external libraries are not permitted)
- The solve function signature must remain unchanged
- The final result must be stored in output
Examples
示例见站点页面(包含 3×3×3 与 2×2×2 的体数据例)。
Constraints
- 1 ≤ input_depth, input_rows, input_cols ≤ 256
- 1 ≤ kernel_depth, kernel_rows, kernel_cols ≤ 5
- kernel_depth ≤ input_depth
- kernel_rows ≤ input_rows
- kernel_cols ≤ input_cols
- Performance is measured with input_cols = 128, input_rows = 128, kernel_cols = 5, kernel_rows = 5