fix(total-3mm): match M297 architecture
Browse filesM297.pt contains five encoder stages with channels 1,32,64,128,256,320. The published model.py reused the extra 320 stage from the full-resolution model, causing strict checkpoint loading to fail. Validated with KonfAI 5195b79: strict load succeeds (16,550,518 parameters).
- total-3mm/model.py +2 -2
total-3mm/model.py
CHANGED
|
@@ -47,7 +47,7 @@ class ClipAndNormalize(torch.nn.Module):
|
|
| 47 |
class Unet_TS_CT(network.Network):
|
| 48 |
|
| 49 |
# Intrinsic to the pretrained weights (network architecture), not a tunable — fixed here.
|
| 50 |
-
CHANNELS = [1, 32, 64, 128, 256, 320
|
| 51 |
|
| 52 |
|
| 53 |
def __init__(self,
|
|
@@ -76,4 +76,4 @@ class Unet_TS_CT(network.Network):
|
|
| 76 |
):
|
| 77 |
nb_class, in_channels = state_dict["Model"]["Unet_TS_CT"]["Head.Conv.weight"].shape[:2]
|
| 78 |
self["Head"].add_module("Conv", torch.nn.Conv3d(in_channels = in_channels, out_channels = nb_class, kernel_size = 1, stride = 1, padding = 0))
|
| 79 |
-
super().load(state_dict, init, ema)
|
|
|
|
| 47 |
class Unet_TS_CT(network.Network):
|
| 48 |
|
| 49 |
# Intrinsic to the pretrained weights (network architecture), not a tunable — fixed here.
|
| 50 |
+
CHANNELS = [1, 32, 64, 128, 256, 320]
|
| 51 |
|
| 52 |
|
| 53 |
def __init__(self,
|
|
|
|
| 76 |
):
|
| 77 |
nb_class, in_channels = state_dict["Model"]["Unet_TS_CT"]["Head.Conv.weight"].shape[:2]
|
| 78 |
self["Head"].add_module("Conv", torch.nn.Conv3d(in_channels = in_channels, out_channels = nb_class, kernel_size = 1, stride = 1, padding = 0))
|
| 79 |
+
super().load(state_dict, init, ema)
|