class_docstr: Apply a fixed permutation to the pixels of the given image.
  
  Works with both Tensors and PIL images. Returns an object of the same type
  of the input element.
class_docstr_tok: ["Apply","a","fixed","permutation","to","the","pixels","of","the","given","image",".","Works","with","both","Tensors","and","PIL","images",".","Returns","an","object","of","the","same","type","of","the","input","element","."]
code: def __init__(self, index_permutation: Sequence[int]):
      self.permutation = index_permutation
      self._to_tensor = ToTensor()
      self._to_image = ToPILImage()
  
file_path: avalanche/avalanche/benchmarks/classic/cmnist.py
imports: from pathlib import Path
  from typing import Optional, Sequence, Union, Any
  import torch
  from PIL.Image import Image
  from torch import Tensor
  from torchvision.transforms import ToTensor, ToPILImage, Compose, Normalize, RandomRotation
  import numpy
  from avalanche.benchmarks import NCScenario, nc_benchmark
  from avalanche.benchmarks.classic.classic_benchmarks_utils import check_vision_benchmark
  from avalanche.benchmarks.datasets.external_datasets.mnist import get_mnist_dataset
  from avalanche.benchmarks.utils import _make_taskaware_classification_dataset, DefaultTransformGroups
  from avalanche.benchmarks.utils.data import make_avalanche_dataset
label_desc: Use image node_id 1 to create a new PixelsPermutation object from inherited base classes: object with example: obj = PixelsPermutation(index_permutation)