class_docstr: Permutes input vector in a random but fixed way.
  
  Args:
      dim (list[tuple[int]]): Dimension of the input vector.
      seed (float | None=None): Seed for the random permutation.
docstr: Returns a random permutation of the channels for each input.
  
  Args:
      i: index of the input
  
  Returns:
      tuple[Tensor, Tensor]: permutation and inverse permutation
docstr_tok: ["Returns","a","random","permutation","of","the","channels","for","each","input",".","Args",":","i",":","index","of","the","input","Returns",":","tuple","[","Tensor",",","Tensor","]",":","permutation","and","inverse","permutation"]
code: def get_random_perm(self, index: int) -> tuple[Tensor, Tensor]:
      """Returns a random permutation of the channels for each input.
  
      Args:
          i: index of the input
  
      Returns:
          tuple[Tensor, Tensor]: permutation and inverse permutation
      """
      perm = np.random.permutation(self.in_channels[index])
      perm_inv = np.zeros_like(perm)
      for idx, permutation in enumerate(perm):
          perm_inv[permutation] = idx
  
      perm = torch.LongTensor(perm)
      perm_inv = torch.LongTensor(perm_inv)
      return perm, perm_inv
  
imports: from __future__ import annotations
  from math import exp
  import numpy
  import torch
  import torch.nn.functional
  from FrEIA.framework import GraphINN, InputNode, Node, OutputNode
  from FrEIA.modules import InvertibleModule
  from torch import Tensor, nn
  from torchvision.models.efficientnet import EfficientNet_B5_Weights
  from anomalib.models.components.feature_extractors import TorchFXFeatureExtractor
  from .anomaly_map import AnomalyMapGenerator, AnomalyMapMode
label_desc: Use image node_id 2 for calling the ParallelPermute obj's underlying member method code with example usage: obj.get_random_perm(index) and returns: perm,  perm_inv