class_docstr: Class for sparse matrix.
class_docstr_tok: ["Class","for","sparse","matrix","."]
docstr: Returns a copy in dense matrix format of the sparse matrix.
  
  Returns
  -------
  torch.Tensor
      The copy in dense matrix format
docstr_tok: ["Returns","a","copy","in","dense","matrix","format","of","the","sparse","matrix",".","Returns","--","--","--","-","torch.Tensor","The","copy","in","dense","matrix","format"]
code: def to_dense(self) -> torch.Tensor:
      """Returns a copy in dense matrix format of the sparse matrix.
  
      Returns
      -------
      torch.Tensor
          The copy in dense matrix format
      """
      row, col = self.coo()
      val = self.val
      shape = self.shape + val.shape[1:]
      mat = torch.zeros(shape, device=self.device, dtype=self.dtype)
      mat[row, col] = val
      return mat
  
imports: from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 14 for calling the SparseMatrix obj's underlying member method code with example usage: obj.to_dense() and returns: mat