parameters: (self, feat, training, num_channels)
return_statement: return feat
docstring: Apply 1x1 conv to change layer width if necessary.
docstring_summary: Apply 1x1 conv to change layer width if necessary.
docstring_tokens: Apply 1x1 conv to change layer width if necessary .
function: def _maybe_apply_1x1(self, feat, training, num_channels):
          """Apply 1x1 conv to change layer width if necessary."""
          if num_channels != self.target_num_channels:
              feat = self.conv2d(feat)
              if self.apply_bn:
                  feat = self.bn(feat, training=training)
          return feat
function_tokens: def _maybe_apply_1x1 ( self , feat , training , num_channels ) : if num_channels != self . target_num_channels : feat = self . conv2d ( feat ) if self . apply_bn : feat = self . bn ( feat , training = training ) return feat