@@ -409,7 +409,7 @@ class C2f(eqx.Module):
409409
410410 conv1 : SingleConvBlock
411411 conv2 : SingleConvBlock
412- blocks : list [ConvBottleneck ]
412+ blocks : Tuple [ConvBottleneck , ... ]
413413
414414 def __init__ (
415415 self ,
@@ -445,7 +445,7 @@ def __init__(
445445 key = key_conv2 ,
446446 )
447447
448- self .blocks = [
448+ self .blocks = tuple (
449449 ConvBottleneck (
450450 in_channels = self .hidden_channels ,
451451 out_channels = self .hidden_channels ,
@@ -456,7 +456,7 @@ def __init__(
456456 key = key_blocks [i ],
457457 )
458458 for i in range (n )
459- ]
459+ )
460460
461461 def __call__ (
462462 self ,
@@ -589,7 +589,7 @@ class C3k2(eqx.Module):
589589
590590 conv1 : SingleConvBlock
591591 conv2 : SingleConvBlock
592- blocks : list [ConvBottleneck ] | list [C3k ]
592+ blocks : Tuple [ConvBottleneck , ... ] | Tuple [C3k , ... ]
593593
594594 def __init__ (
595595 self ,
@@ -627,7 +627,7 @@ def __init__(
627627 )
628628
629629 if c3k :
630- self .blocks = [
630+ self .blocks = tuple (
631631 C3k (
632632 in_channels = self .hidden_channels ,
633633 out_channels = self .hidden_channels ,
@@ -637,9 +637,9 @@ def __init__(
637637 key = key_blocks [i ],
638638 )
639639 for i in range (n )
640- ]
640+ )
641641 else :
642- self .blocks = [
642+ self .blocks = tuple (
643643 ConvBottleneck (
644644 in_channels = self .hidden_channels ,
645645 out_channels = self .hidden_channels ,
@@ -648,7 +648,7 @@ def __init__(
648648 key = key_blocks [i ],
649649 )
650650 for i in range (n )
651- ]
651+ )
652652
653653 def __call__ (
654654 self ,
@@ -1078,12 +1078,12 @@ class GenericGhostModule(eqx.Module):
10781078 cheap_operation : eqx .nn .Conv2d
10791079
10801080 # Training
1081- primary_rpr_conv : list [eqx .nn .Conv2d ]
1081+ primary_rpr_conv : Tuple [eqx .nn .Conv2d , ... ]
10821082 primary_rpr_scale : eqx .nn .Conv2d | eqx .nn .Identity
10831083 primary_shared_norm : eqx .nn .GroupNorm
10841084 primary_activation : Callable
10851085
1086- cheap_rpr_conv : list [eqx .nn .Conv2d ]
1086+ cheap_rpr_conv : Tuple [eqx .nn .Conv2d , ... ]
10871087 cheap_rpr_scale : eqx .nn .Conv2d | eqx .nn .Identity
10881088 cheap_shared_norm : eqx .nn .GroupNorm
10891089 cheap_activation : Callable
@@ -1156,7 +1156,7 @@ def __init__(
11561156
11571157 # Primary training branches
11581158 init_num_groups = nearest_power_of_2_divisor (init_channels , 32 )
1159- self .primary_rpr_conv = [
1159+ self .primary_rpr_conv = tuple (
11601160 eqx .nn .Conv2d (
11611161 in_channels = in_channels ,
11621162 out_channels = init_channels ,
@@ -1167,7 +1167,7 @@ def __init__(
11671167 key = key_ps [i ],
11681168 )
11691169 for i in range (num_conv_branches )
1170- ]
1170+ )
11711171 self .primary_rpr_scale = (
11721172 eqx .nn .Conv2d (
11731173 in_channels = in_channels ,
@@ -1186,7 +1186,7 @@ def __init__(
11861186
11871187 # Cheap training branches (depthwise)
11881188 newchannels_num_groups = nearest_power_of_2_divisor (new_channels , 32 )
1189- self .cheap_rpr_conv = [
1189+ self .cheap_rpr_conv = tuple (
11901190 eqx .nn .Conv2d (
11911191 in_channels = init_channels ,
11921192 out_channels = new_channels ,
@@ -1198,7 +1198,7 @@ def __init__(
11981198 key = key_cs [i ],
11991199 )
12001200 for i in range (self .num_conv_branches )
1201- ]
1201+ )
12021202 self .cheap_rpr_scale = (
12031203 eqx .nn .Conv2d (
12041204 in_channels = init_channels ,
@@ -1344,7 +1344,7 @@ class GhostBottleneck(eqx.Module):
13441344 ghost2 : "GenericGhostModule"
13451345
13461346 dw_conv : eqx .nn .Conv2d | eqx .nn .Identity
1347- dw_rpr_conv : list [eqx .nn .Conv2d ] # depthwise conv branches (no bias)
1347+ dw_rpr_conv : Tuple [eqx .nn .Conv2d , ... ] # depthwise conv branches (no bias)
13481348 dw_rpr_scale : eqx .nn .Conv2d | eqx .nn .Identity # optional 1x1 depthwise (no bias)
13491349 dw_shared_norm : eqx .nn .GroupNorm | eqx .nn .Identity
13501350
@@ -1393,7 +1393,7 @@ def __init__(
13931393 # Depthwise stage (only if stride > 1)
13941394 if stride > 1 :
13951395 # Training-time branches (depthwise, no bias); no activation; shared GN after sum
1396- self .dw_rpr_conv = [
1396+ self .dw_rpr_conv = tuple (
13971397 eqx .nn .Conv2d (
13981398 in_channels = mid_channels ,
13991399 out_channels = mid_channels ,
@@ -1405,7 +1405,7 @@ def __init__(
14051405 key = k_dw_list [i ],
14061406 )
14071407 for i in range (3 )
1408- ]
1408+ )
14091409 # Optional scale branch (1x1, depthwise, stride=stride)
14101410 self .dw_rpr_scale = (
14111411 eqx .nn .Conv2d (
0 commit comments