Add Conv3DTranspose, UpSampling3D, and stride-1 fast path for Conv3D - #456
Merged
Conversation
Builds on the Conv3D foundation: - Conv3DTranspose: dilates input then runs forward conv with strides (1,1,1) and reversed filters along all three spatial axes. - UpSampling3D: nearest-neighbor resize for volumetric tensors. - convolve_accumulative_s1x1x1_3d: collapses the spatial output loops into one big im2col mapping, mirroring the 2D fast path. Triggers automatically when strides are (1,1,1), so it also speeds up Conv3DTranspose. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #455. Builds out the rest of the 3D layer family that Keras supports.
Summary
conv_3d_transpose_layer, JSON dispatch entry, and Python exporter (prepare_filter_weights_conv_3d_transpose+show_conv_3d_transpose_layer).upsampling_3d_layer,resize3d_nearesthelper intensor.hpp, JSON dispatch, config-only Python exporter.convolve_accumulative_s1x1x1_3d): collapses the spatial output loops into one big im2col mapping, mirroringconvolve_accumulative_s1x1from the 2D path. Triggers automatically when all strides are 1, so it also speeds up Conv3DTranspose (which always uses internal stride 1).preprocess_convolution_3dgains an optionaltransposedflag;dilate_tensor_3dgains optionaltrailing_zeros;generate_filters_3dgains optionaltranspose; newreverse_size_dim_4_dimensionhelper.Conv3DTranspose×5 variants andUpSampling3D×3 variants added togenerate_test_models.py.Conv3DTransposeadded to supported list,Upsampling3Dremoved from unsupported list,UpSampling1D/2Dupdated to1D/2D/3D.Test plan
test_model_exhaustive_testagainst the updatedgenerate_test_models.pyOut of scope
SeparableConv3DandDepthwiseConv3D: Keras 3 doesn't expose them (hasattr(keras.layers, ...) == False), so there's nothing to import from🤖 Generated with Claude Code