@@ -109,11 +109,9 @@ def __repr__(self):
109109
110110 def build (self , inputs_shape ):
111111 if self .data_format == 'channels_last' :
112- self .data_format = 'NWC'
113112 if self .in_channels is None :
114113 self .in_channels = inputs_shape [- 1 ]
115114 elif self .data_format == 'channels_first' :
116- self .data_format = 'NCW'
117115 if self .in_channels is None :
118116 self .in_channels = inputs_shape [1 ]
119117 else :
@@ -253,13 +251,11 @@ def __repr__(self):
253251
254252 def build (self , inputs_shape ):
255253 if self .data_format == 'channels_last' :
256- self .data_format = 'NHWC'
257254 if self .in_channels is None :
258255 self .in_channels = inputs_shape [- 1 ]
259256 self ._strides = [1 , self ._strides [0 ], self ._strides [1 ], 1 ]
260257 self ._dilation_rate = [1 , self ._dilation_rate [0 ], self ._dilation_rate [1 ], 1 ]
261258 elif self .data_format == 'channels_first' :
262- self .data_format = 'NCHW'
263259 if self .in_channels is None :
264260 self .in_channels = inputs_shape [1 ]
265261 self ._strides = [1 , 1 , self ._strides [0 ], self ._strides [1 ]]
@@ -400,13 +396,11 @@ def __repr__(self):
400396
401397 def build (self , inputs_shape ):
402398 if self .data_format == 'channels_last' :
403- self .data_format = 'NDHWC'
404399 if self .in_channels is None :
405400 self .in_channels = inputs_shape [- 1 ]
406401 self ._strides = [1 , self ._strides [0 ], self ._strides [1 ], self ._strides [2 ], 1 ]
407402 self ._dilation_rate = [1 , self .dilation [0 ], self .dilation [1 ], self .dilation [2 ], 1 ]
408403 elif self .data_format == 'channels_first' :
409- self .data_format = 'NCDHW'
410404 if self .in_channels is None :
411405 self .in_channels = inputs_shape [1 ]
412406 self ._strides = [1 , 1 , self ._strides [0 ], self ._strides [1 ], self ._strides [2 ]]
@@ -548,11 +542,9 @@ def __repr__(self):
548542
549543 def build (self , inputs_shape ):
550544 if self .data_format == 'channels_last' :
551- self .data_format = 'NWC'
552545 if self .in_channels is None :
553546 self .in_channels = inputs_shape [- 1 ]
554547 elif self .data_format == 'channels_first' :
555- self .data_format = 'NCW'
556548 if self .in_channels is None :
557549 self .in_channels = inputs_shape [1 ]
558550 else :
@@ -697,11 +689,9 @@ def __repr__(self):
697689
698690 def build (self , inputs_shape ):
699691 if self .data_format == 'channels_last' :
700- self .data_format = 'NHWC'
701692 if self .in_channels is None :
702693 self .in_channels = inputs_shape [- 1 ]
703694 elif self .data_format == 'channels_first' :
704- self .data_format = 'NCHW'
705695 if self .in_channels is None :
706696 self .in_channels = inputs_shape [1 ]
707697 else :
@@ -840,11 +830,9 @@ def __repr__(self):
840830
841831 def build (self , inputs_shape ):
842832 if self .data_format == 'channels_last' :
843- self .data_format = 'NDHWC'
844833 if self .in_channels is None :
845834 self .in_channels = inputs_shape [- 1 ]
846835 elif self .data_format == 'channels_first' :
847- self .data_format = 'NCDHW'
848836 if self .in_channels is None :
849837 self .in_channels = inputs_shape [1 ]
850838 else :
0 commit comments