class_docstr: Cross convolution for the three scales.
  
  Args:
      in_channels (int): Number of input channels.
      channels (int): Number of output channels in the hidden convolution and the upscaling layers.
      channels_hidden (int, optional): Number of input channels in the hidden convolution layers. Defaults to 512.
      kernel_size (int, optional): Kernel size of the convolution layers. Defaults to 3.
      leaky_slope (float, optional): Slope of the leaky ReLU activation. Defaults to 0.1.
      batch_norm (bool, optional): Whether to use batch normalization. Defaults to False.
      use_gamma (bool, optional): Whether to use gamma parameters for the cross convolutions. Defaults to True.
code: def __init__(
      self,
      in_channels: int,
      channels: int,
      channels_hidden: int = 512,
      kernel_size: int = 3,
      leaky_slope: float = 0.1,
      batch_norm: bool = False,
      use_gamma: bool = True,
  ) -> None:
      super().__init__()
  
      pad = kernel_size // 2
      self.leaky_slope = leaky_slope
      pad_mode = "zeros"
      self.use_gamma = use_gamma
      self.gamma0 = nn.Parameter(torch.zeros(1))
      self.gamma1 = nn.Parameter(torch.zeros(1))
      self.gamma2 = nn.Parameter(torch.zeros(1))
  
      self.conv_scale0_0 = nn.Conv2d(
          in_channels,
          channels_hidden,
          kernel_size=kernel_size,
          padding=pad,
          bias=not batch_norm,
          padding_mode=pad_mode,
      )
  
      self.conv_scale1_0 = nn.Conv2d(
          in_channels,
          channels_hidden,
          kernel_size=kernel_size,
          padding=pad,
          bias=not batch_norm,
          padding_mode=pad_mode,
      )
      self.conv_scale2_0 = nn.Conv2d(
          in_channels,
          channels_hidden,
          kernel_size=kernel_size,
          padding=pad,
          bias=not batch_norm,
          padding_mode=pad_mode,
      )
      self.conv_scale0_1 = nn.Conv2d(
          channels_hidden * 1,
          channels,  #
          kernel_size=kernel_size,
          padding=pad,
          bias=not batch_norm,
          padding_mode=pad_mode,
          dilation=1,
      )
      self.conv_scale1_1 = nn.Conv2d(
          channels_hidden * 1,
          channels,  #
          kernel_size=kernel_size,
          padding=pad * 1,
          bias=not batch_norm,
          padding_mode=pad_mode,
          dilation=1,
      )
      self.conv_scale2_1 = nn.Conv2d(
          channels_hidden * 1,
          channels,  #
          kernel_size=kernel_size,
          padding=pad,
          bias=not batch_norm,
          padding_mode=pad_mode,
      )
  
      self.upsample = nn.Upsample(
          scale_factor=2, mode="bilinear", align_corners=False
      )
  
      self.up_conv10 = nn.Conv2d(
          channels_hidden,
          channels,
          kernel_size=kernel_size,
          padding=pad,
          bias=True,
          padding_mode=pad_mode,
      )
  
      self.up_conv21 = nn.Conv2d(
          channels_hidden,
          channels,
          kernel_size=kernel_size,
          padding=pad,
          bias=True,
          padding_mode=pad_mode,
      )
  
      self.down_conv01 = nn.Conv2d(
          channels_hidden,
          channels,
          kernel_size=kernel_size,
          padding=pad,
          bias=not batch_norm,
          stride=2,
          padding_mode=pad_mode,
          dilation=1,
      )
  
      self.down_conv12 = nn.Conv2d(
          channels_hidden,
          channels,
          kernel_size=kernel_size,
          padding=pad,
          bias=not batch_norm,
          stride=2,
          padding_mode=pad_mode,
          dilation=1,
      )
  
      self.leaky_relu = nn.LeakyReLU(self.leaky_slope)
  
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 1 to create a new CrossConvolutions object from inherited base classes: nn with example: obj = CrossConvolutions(in_channels, channels, channels_hidden, kernel_size, leaky_slope, batch_norm, use_gamma)