@@ -33,6 +33,8 @@ def kT3_32ch(): return 23
3333def kT3_64ch (): return 25
3434def kT3_128ch (): return 27
3535
36+ def kT3v3_4ch (): return 47
37+ def kT3v3_8ch (): return 48
3638def kT3v3_16ch (): return 36
3739def kT3v3_32ch (): return 37
3840def kT3v3_64ch (): return 38
@@ -655,9 +657,9 @@ def kConv2D(last_tensor, filters=32, channel_axis=3, name=None, activation=None,
655657 return kConv2DType0 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
656658 elif kType == 1 :
657659 return kConv2DType1 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
658- elif kType == 2 :
660+ elif kType == D6_16ch () :
659661 return kConv2DType2 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 16 )
660- elif kType == 3 :
662+ elif kType == kT3_16ch () :
661663 return kConv2DType3 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
662664 elif kType == 4 :
663665 return kConv2DType4 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
@@ -677,11 +679,11 @@ def kConv2D(last_tensor, filters=32, channel_axis=3, name=None, activation=None,
677679 return kConv2DType7 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , bin_conv_count = 5 )
678680 elif kType == 12 :
679681 return kConv2DType7 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , bin_conv_count = 6 )
680- elif kType == 13 :
682+ elif kType == D6_32ch () :
681683 return kConv2DType2 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 32 )
682- elif kType == 14 :
684+ elif kType == D6_8ch () :
683685 return kConv2DType2 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 8 )
684- elif kType == 15 :
686+ elif kType == D6_4ch () :
685687 return kConv2DType2 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 4 )
686688 elif kType == 16 :
687689 if prev_layer_channel_count >= filters :
@@ -706,15 +708,15 @@ def kConv2D(last_tensor, filters=32, channel_axis=3, name=None, activation=None,
706708 return kConv2DType8 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 16 , always_intergroup = True )
707709 elif kType == 22 :
708710 return kConv2DType8 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 32 , always_intergroup = True )
709- elif kType == 23 :
711+ elif kType == kT3_32ch () :
710712 return kConv2DType3 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 32 )
711- elif kType == 24 :
713+ elif kType == D6_64ch () :
712714 return kConv2DType2 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 64 )
713- elif kType == 25 :
715+ elif kType == kT3_64ch () :
714716 return kConv2DType3 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 64 )
715- elif kType == 26 :
717+ elif kType == D6_128ch () :
716718 return kConv2DType2 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 128 )
717- elif kType == 27 :
719+ elif kType == kT3_128ch () :
718720 return kConv2DType3 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 128 )
719721 elif kType == 28 :
720722 return kConv2DType9 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 16 , always_intergroup = True )
@@ -724,36 +726,40 @@ def kConv2D(last_tensor, filters=32, channel_axis=3, name=None, activation=None,
724726 return kConv2DType9 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 64 , always_intergroup = True )
725727 elif kType == 31 :
726728 return kConv2DType9 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 128 , always_intergroup = True )
727- elif kType == 32 :
729+ elif kType == D6v3_16ch () :
728730 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 16 , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
729- elif kType == 33 :
731+ elif kType == D6v3_32ch () :
730732 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 32 , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
731- elif kType == 34 :
733+ elif kType == D6v3_64ch () :
732734 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 64 , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
733- elif kType == 35 :
735+ elif kType == D6v3_128ch () :
734736 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 128 , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
735- elif kType == 36 :
737+ elif kType == kT3v3_16ch () :
736738 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 16 , kernel_size = kernel_size , stride_size = stride_size , padding = padding , never_intergroup = True )
737- elif kType == 37 :
739+ elif kType == kT3v3_32ch () :
738740 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 32 , kernel_size = kernel_size , stride_size = stride_size , padding = padding , never_intergroup = True )
739- elif kType == 38 :
741+ elif kType == kT3v3_64ch () :
740742 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 64 , kernel_size = kernel_size , stride_size = stride_size , padding = padding , never_intergroup = True )
741- elif kType == 39 :
743+ elif kType == kT3v3_128ch () :
742744 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 128 , kernel_size = kernel_size , stride_size = stride_size , padding = padding , never_intergroup = True )
743- elif kType == 40 :
745+ elif kType == D6_12ch () :
744746 return kConv2DType2 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 12 )
745- elif kType == 41 :
747+ elif kType == D6_24ch () :
746748 return kConv2DType2 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , kernel_size = kernel_size , stride_size = stride_size , padding = padding , min_channels_per_group = 24 )
747- elif kType == 42 :
749+ elif kType == D6v3_12ch () :
748750 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 12 , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
749- elif kType == 43 :
751+ elif kType == D6v3_24ch () :
750752 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 24 , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
751- elif kType == 44 :
753+ elif kType == D6v3_8ch () :
752754 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 8 , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
753- elif kType == 45 :
755+ elif kType == D6v3_4ch () :
754756 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 4 , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
755- elif kType == 46 :
757+ elif kType == D6v3_2ch () :
756758 return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 2 , kernel_size = kernel_size , stride_size = stride_size , padding = padding )
759+ elif kType == kT3v3_4ch ():
760+ return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 4 , kernel_size = kernel_size , stride_size = stride_size , padding = padding , never_intergroup = True )
761+ elif kType == kT3v3_8ch ():
762+ return kConv2DType10 (last_tensor , filters = filters , channel_axis = channel_axis , name = name , activation = activation , has_batch_norm = has_batch_norm , has_batch_scale = has_batch_scale , use_bias = use_bias , min_channels_per_group = 8 , kernel_size = kernel_size , stride_size = stride_size , padding = padding , never_intergroup = True )
757763
758764def kPointwiseConv2D (last_tensor , filters = 32 , channel_axis = 3 , name = None , activation = None , has_batch_norm = True , has_batch_scale = True , use_bias = True , kType = 2 ):
759765 """
0 commit comments