credit.models.wxformer.crossformer_ensemble
===========================================

.. py:module:: credit.models.wxformer.crossformer_ensemble


Attributes
----------

.. autoapisummary::

   credit.models.wxformer.crossformer_ensemble.logger


Classes
-------

.. autoapisummary::

   credit.models.wxformer.crossformer_ensemble.CrossFormerWithNoise


Module Contents
---------------

.. py:class:: CrossFormerWithNoise(noise_latent_dim=128, encoder_noise_factor=0.05, decoder_noise_factor=0.275, encoder_noise=True, freeze=True, correlated=False, **kwargs)

   Bases: :py:obj:`credit.models.crossformer.CrossFormer`


   CrossFormer variant with pixel-wise noise injection in both encoder and decoder stages.

   .. attribute:: noise_latent_dim

      Dimensionality of the noise vector.

      :type: int

   .. attribute:: encoder_noise_factor

      Initial scaling factor for encoder noise injection.

      :type: float

   .. attribute:: decoder_noise_factor

      Initial scaling factor for decoder noise injection.

      :type: float

   .. attribute:: encoder_noise

      Whether to apply noise injection in the encoder.

      :type: bool

   .. attribute:: freeze

      Whether to freeze pre-trained model weights.

      :type: bool


   .. py:attribute:: noise_latent_dim
      :value: 128



   .. py:attribute:: correlated
      :value: False



   .. py:attribute:: encoder_noise
      :value: True



   .. py:attribute:: noise_inject1


   .. py:attribute:: noise_inject2


   .. py:attribute:: noise_inject3


   .. py:method:: forward(x, noise=None, forecast_step=None)

      Forward pass through the CrossFormer with noise injection.

      :param x: Input tensor of shape (batch_size, channels, height, width).
      :type x: Tensor
      :param noise: External noise tensor. If None, noise is sampled internally. Defaults to None.
      :type noise: Tensor, optional

      :returns: Output tensor after passing through the model.
      :rtype: Tensor



.. py:data:: logger

