MCPcopy Create free account
hub / github.com/PABannier/sam3.cpp / edgetam_repvit_downsample

Class edgetam_repvit_downsample

sam3.cpp:761–778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

759};
760
761struct edgetam_repvit_downsample {
762 // Pre-block (RepViT block at prev-stage channels, no SE)
763 edgetam_repvit_block pre_block;
764
765 // Spatial downsample: DW Conv 3×3, stride=2
766 struct ggml_tensor* spatial_w = nullptr; // [3, 3, 1, ch_in]
767 struct ggml_tensor* spatial_b = nullptr; // [ch_in]
768
769 // Channel expand: 1×1 Conv
770 struct ggml_tensor* channel_w = nullptr; // [1, 1, ch_in, ch_out]
771 struct ggml_tensor* channel_b = nullptr; // [ch_out]
772
773 // FFN: 1×1 expand → GELU → 1×1 project
774 struct ggml_tensor* ffn_conv1_w = nullptr; // [1, 1, ch_out, ch_out*2]
775 struct ggml_tensor* ffn_conv1_b = nullptr; // [ch_out*2]
776 struct ggml_tensor* ffn_conv2_w = nullptr; // [1, 1, ch_out*2, ch_out]
777 struct ggml_tensor* ffn_conv2_b = nullptr; // [ch_out]
778};
779
780struct edgetam_repvit_stage {
781 std::vector<edgetam_repvit_block> blocks;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected