Files

68 lines
4.8 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<svg width="700" height="300" xmlns="http://www.w3.org/2000/svg">
<defs>
<marker id="inc-arrow" markerWidth="7" markerHeight="5" refX="7" refY="2.5" orient="auto">
<polygon points="0 0, 7 2.5, 0 5" fill="#555"/>
</marker>
</defs>
<text x="350" y="22" fill="#333" font-size="14" font-weight="bold" text-anchor="middle">Inception Module: Multi-Scale Parallel Convolutions</text>
<!-- Input feature map -->
<rect x="270" y="40" width="160" height="30" rx="4" fill="#ecf0f1" stroke="#999" stroke-width="1.5"/>
<text x="350" y="60" fill="#333" font-size="10" text-anchor="middle" font-weight="bold">Previous Layer</text>
<!-- Arrows down from input to four branches -->
<line x1="130" y1="70" x2="130" y2="95" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<line x1="290" y1="70" x2="290" y2="95" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<line x1="430" y1="70" x2="430" y2="95" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<line x1="570" y1="70" x2="570" y2="95" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<!-- Horizontal line connecting to input -->
<line x1="130" y1="70" x2="570" y2="70" stroke="#555" stroke-width="1.2"/>
<line x1="350" y1="70" x2="350" y2="70" stroke="#555" stroke-width="1.2"/>
<!-- Branch 1: 1x1 conv -->
<rect x="85" y="100" width="90" height="35" rx="6" fill="#3498db" opacity="0.15" stroke="#3498db" stroke-width="1.5"/>
<text x="130" y="122" fill="#3498db" font-size="10" text-anchor="middle" font-weight="bold">1×1 conv</text>
<!-- Branch 2: 1x1 bottleneck → 3x3 conv -->
<rect x="245" y="100" width="90" height="28" rx="6" fill="#f39c12" opacity="0.15" stroke="#f39c12" stroke-width="1.5"/>
<text x="290" y="118" fill="#f39c12" font-size="9" text-anchor="middle" font-weight="bold">1×1 conv</text>
<line x1="290" y1="128" x2="290" y2="145" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<rect x="245" y="150" width="90" height="28" rx="6" fill="#f39c12" opacity="0.25" stroke="#f39c12" stroke-width="1.5"/>
<text x="290" y="168" fill="#f39c12" font-size="9" text-anchor="middle" font-weight="bold">3×3 conv</text>
<!-- Branch 3: 1x1 bottleneck → 5x5 conv -->
<rect x="385" y="100" width="90" height="28" rx="6" fill="#27ae60" opacity="0.15" stroke="#27ae60" stroke-width="1.5"/>
<text x="430" y="118" fill="#27ae60" font-size="9" text-anchor="middle" font-weight="bold">1×1 conv</text>
<line x1="430" y1="128" x2="430" y2="145" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<rect x="385" y="150" width="90" height="28" rx="6" fill="#27ae60" opacity="0.25" stroke="#27ae60" stroke-width="1.5"/>
<text x="430" y="168" fill="#27ae60" font-size="9" text-anchor="middle" font-weight="bold">5×5 conv</text>
<!-- Branch 4: 3x3 max pool → 1x1 conv -->
<rect x="525" y="100" width="90" height="28" rx="6" fill="#e74c3c" opacity="0.15" stroke="#e74c3c" stroke-width="1.5"/>
<text x="570" y="118" fill="#e74c3c" font-size="9" text-anchor="middle" font-weight="bold">3×3 pool</text>
<line x1="570" y1="128" x2="570" y2="145" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<rect x="525" y="150" width="90" height="28" rx="6" fill="#e74c3c" opacity="0.25" stroke="#e74c3c" stroke-width="1.5"/>
<text x="570" y="168" fill="#e74c3c" font-size="9" text-anchor="middle" font-weight="bold">1×1 conv</text>
<!-- Extend branch 1 down to align with others -->
<line x1="130" y1="135" x2="130" y2="178" stroke="#3498db" stroke-width="1" stroke-dasharray="3,2"/>
<!-- Arrows from branches to concat -->
<line x1="130" y1="178" x2="130" y2="205" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<line x1="290" y1="178" x2="290" y2="205" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<line x1="430" y1="178" x2="430" y2="205" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<line x1="570" y1="178" x2="570" y2="205" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<!-- Horizontal line merging to concat -->
<line x1="130" y1="205" x2="570" y2="205" stroke="#555" stroke-width="1.2"/>
<!-- Concat box -->
<line x1="350" y1="205" x2="350" y2="218" stroke="#555" stroke-width="1.2" marker-end="url(#inc-arrow)"/>
<rect x="260" y="222" width="180" height="30" rx="6" fill="#9b59b6" opacity="0.15" stroke="#9b59b6" stroke-width="2"/>
<text x="350" y="242" fill="#9b59b6" font-size="11" text-anchor="middle" font-weight="bold">Concatenate (channel dim)</text>
<!-- Bottom note -->
<rect x="100" y="265" width="500" height="25" rx="4" fill="#f5f5f5" stroke="#333" stroke-width="1"/>
<text x="350" y="282" fill="#666" font-size="9" text-anchor="middle">1×1 bottlenecks reduce channels before expensive 3×3/5×5 convolutions, cutting computation dramatically.</text>
</svg>