parameters: (self, c)
return_statement: return c.view(*expected_view_shape)
docstring: Broadcasts a correction factor to the weight.
docstring_summary: Broadcasts a correction factor to the weight.
docstring_tokens: Broadcasts a correction factor to the weight .
function: def broadcast_correction_weight(self, c):
      """Broadcasts a correction factor to the weight."""
      if c.dim() != 1:
        raise ValueError("Correction factor needs to have a single dimension")
      # weight.shape: [in_channels, out_channels // groups, kernel_size[0], kernel_size[1], kernel_size[2]]
      expected_view_shape = (1,) + c.shape + (1,) * 3
      return c.view(*expected_view_shape)
function_tokens: def broadcast_correction_weight ( self , c ) : if c . dim ( ) != 1 : raise ValueError ( "Correction factor needs to have a single dimension" ) # weight.shape: [in_channels, out_channels // groups, kernel_size[0], kernel_size[1], kernel_size[2]] expected_view_shape = ( 1 , ) + c . shape + ( 1 , ) * 3 return c . view ( * expected_view_shape )