parameters: (self, *names, **rename_map)
return_statement: return update_names(self, names, rename_map, inplace=False)
docstring: Renames dimension names of :attr:`self`.
  
          There are two main usages:
  
          ``self.rename(**rename_map)`` returns a view on tensor that has dims
          renamed as specified in the mapping :attr:`rename_map`.
  
          ``self.rename(*names)`` returns a view on tensor, renaming all
          dimensions positionally using :attr:`names`.
          Use ``self.rename(None)`` to drop names on a tensor.
  
          One cannot specify both positional args :attr:`names` and keyword args
          :attr:`rename_map`.
  
          Examples::
  
              >>> imgs = torch.rand(2, 3, 5, 7, names=('N', 'C', 'H', 'W'))
              >>> renamed_imgs = imgs.rename(N='batch', C='channels')
              >>> renamed_imgs.names
              ('batch', 'channels', 'H', 'W')
  
              >>> renamed_imgs = imgs.rename(None)
              >>> renamed_imgs.names
              (None,)
  
              >>> renamed_imgs = imgs.rename('batch', 'channel', 'height', 'width')
              >>> renamed_imgs.names
              ('batch', 'channel', 'height', 'width')
  
          .. warning::
              The named tensor API is experimental and subject to change.
docstring_summary: Renames dimension names of :attr:`self`.
docstring_tokens: Renames dimension names of : attr : self .
function: def rename(self, *names, **rename_map):
          """Renames dimension names of :attr:`self`.
  
          There are two main usages:
  
          ``self.rename(**rename_map)`` returns a view on tensor that has dims
          renamed as specified in the mapping :attr:`rename_map`.
  
          ``self.rename(*names)`` returns a view on tensor, renaming all
          dimensions positionally using :attr:`names`.
          Use ``self.rename(None)`` to drop names on a tensor.
  
          One cannot specify both positional args :attr:`names` and keyword args
          :attr:`rename_map`.
  
          Examples::
  
              >>> imgs = torch.rand(2, 3, 5, 7, names=('N', 'C', 'H', 'W'))
              >>> renamed_imgs = imgs.rename(N='batch', C='channels')
              >>> renamed_imgs.names
              ('batch', 'channels', 'H', 'W')
  
              >>> renamed_imgs = imgs.rename(None)
              >>> renamed_imgs.names
              (None,)
  
              >>> renamed_imgs = imgs.rename('batch', 'channel', 'height', 'width')
              >>> renamed_imgs.names
              ('batch', 'channel', 'height', 'width')
  
          .. warning::
              The named tensor API is experimental and subject to change.
  
          """
          if has_torch_function_unary(self):
              return handle_torch_function(Tensor.rename, (self,), self, *names, **rename_map)
  
          # See Note [rename_ / rename API]
          return update_names(self, names, rename_map, inplace=False)
function_tokens: def rename ( self , * names , * * rename_map ) : if has_torch_function_unary ( self ) : return handle_torch_function ( Tensor . rename , ( self , ) , self , * names , * * rename_map ) # See Note [rename_ / rename API] return update_names ( self , names , rename_map , inplace = False )