I’m not sure. According to this it’s not available:

  
    
    
    Inverse not implemented for type Variable 
  
  
    Hey, I tried your suggestion - doesn’t work. The .data call is: 
return torch.inverse(torch.mm(x, x.t()).data) 
And I get the error: 
AttributeError: 'FloatTensor' object has no attribute 'data'
  


Yet this PR looks like it might do it.

  
      github.com/pytorch/pytorch
  
  
      
    
  


  Add Inverse to autograd 67



  by fmassa
  on 10:30AM - 28 May 17



  2 commits
  changed 3 files
  with 32 additions
  and 1 deletions.


  
  
    
    
  
  


Did you try torch.inverse?