Commit 8496a5c
Fix skip connection channel mismatch in ConvNext/SwinT decoders
The decoder incorrectly assumed skip connection channels match computed
decoder filters (refine_convs_filters). For ConvNext/SwinT, actual encoder
channels differ from computed filters, causing RuntimeError during training.
Changes:
- Add skip_channels parameter to SimpleUpsamplingBlock
- Add encoder_channels parameter to Decoder
- Pass actual encoder channels from ConvNextWrapper and SwinTWrapper
Fixes training with ConvNext/SwinT backbones when output_stride != 1.
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 359af3c commit 8496a5c
File tree
3 files changed
+38
-6
lines changed- sleap_nn/architectures
3 files changed
+38
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
284 | 288 | | |
285 | 289 | | |
286 | 290 | | |
| |||
293 | 297 | | |
294 | 298 | | |
295 | 299 | | |
| 300 | + | |
296 | 301 | | |
297 | 302 | | |
298 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
| 394 | + | |
394 | 395 | | |
395 | 396 | | |
396 | 397 | | |
397 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
398 | 406 | | |
399 | 407 | | |
400 | 408 | | |
| |||
469 | 477 | | |
470 | 478 | | |
471 | 479 | | |
472 | | - | |
473 | | - | |
474 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
475 | 483 | | |
476 | | - | |
| 484 | + | |
477 | 485 | | |
478 | | - | |
| 486 | + | |
479 | 487 | | |
480 | 488 | | |
481 | 489 | | |
| |||
582 | 590 | | |
583 | 591 | | |
584 | 592 | | |
| 593 | + | |
585 | 594 | | |
586 | 595 | | |
587 | 596 | | |
| |||
598 | 607 | | |
599 | 608 | | |
600 | 609 | | |
| 610 | + | |
601 | 611 | | |
602 | 612 | | |
603 | 613 | | |
| |||
624 | 634 | | |
625 | 635 | | |
626 | 636 | | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
627 | 644 | | |
628 | 645 | | |
629 | 646 | | |
| |||
642 | 659 | | |
643 | 660 | | |
644 | 661 | | |
| 662 | + | |
645 | 663 | | |
646 | 664 | | |
647 | 665 | | |
| |||
659 | 677 | | |
660 | 678 | | |
661 | 679 | | |
| 680 | + | |
662 | 681 | | |
663 | 682 | | |
664 | 683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
312 | 319 | | |
313 | 320 | | |
314 | 321 | | |
| |||
321 | 328 | | |
322 | 329 | | |
323 | 330 | | |
| 331 | + | |
324 | 332 | | |
325 | 333 | | |
326 | 334 | | |
| |||
0 commit comments