class_docstr: Transforms node positions :obj:`data.pos` with a square transformation
  matrix computed offline (functional name: :obj:`linear_transformation`).
  
  Args:
      matrix (Tensor): Tensor with shape :obj:`[D, D]` where :obj:`D`
          corresponds to the dimensionality of node positions.
class_docstr_tok: ["Transforms","node","positions",":","obj",":","`","data.pos","`","with","a","square","transformation","matrix","computed","offline","(","functional","name",":",":","obj",":","`","linear_transformation","`",")",".","Args",":","matrix","(","Tensor",")",":","Tensor","with","shape",":","obj",":","`","[","D",",","D","]","`","where",":","obj",":","`","D","`","corresponds","to","the","dimensionality","of","node","positions","."]
code: def __init__(self, matrix: Tensor):
      if not isinstance(matrix, Tensor):
          matrix = torch.tensor(matrix)
      assert (
          matrix.dim() == 2
      ), "Transformation matrix should be two-dimensional."
      assert matrix.size(0) == matrix.size(
          1
      ), f"Transformation matrix should be square (got {matrix.size()})"
  
      # Store the matrix as its transpose.
      # We do this to enable post-multiplication in `forward`.
      self.matrix = matrix.t()
  
file_path: pytorch_geometric/torch_geometric/transforms/linear_transformation.py
imports: from typing import Union
  import torch
  from torch import Tensor
  from torch_geometric.data import Data, HeteroData
  from torch_geometric.data.datapipes import functional_transform
  from torch_geometric.transforms import BaseTransform
label_desc: Use image node_id 1 to create a new LinearTransformation object from inherited base classes: BaseTransform with example: obj = LinearTransformation(matrix)