This code snippet transpose the image if it has channels first in the shape. But the shape is taken from the original image seemingly making a false error. It looks like I can simply replace the last x by data to fix this problem, but I wonder if there can be any side effect.
https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/00206ee5678631ac05e430c04b46c2163d06dcf2/art/attacks/poisoning/perturbations/image_perturbations.py#L127-L131
This code snippet transpose the image if it has channels first in the shape. But the shape is taken from the original image seemingly making a false error. It looks like I can simply replace the last x by data to fix this problem, but I wonder if there can be any side effect.