hyrax.models.hsc_dcae
=====================

.. py:module:: hyrax.models.hsc_dcae


Classes
-------

.. autoapisummary::

   hyrax.models.hsc_dcae.ArcsinhActivation
   hyrax.models.hsc_dcae.HSCDCAE


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

.. py:class:: ArcsinhActivation(*args: Any, **kwargs: Any)

   Bases: :py:obj:`torch.nn.Module`


   Helper module for HSCDAE to use the arcsinh function

   Initialize internal Module state, shared by both nn.Module and ScriptModule.


   .. py:method:: forward(x)


.. py:class:: HSCDCAE(config, data_sample=None)

   Bases: :py:obj:`torch.nn.Module`


   This autoencoder is designed to work with datasets that are prepared with Hyrax's HSC Data Set class.

   Initialize internal Module state, shared by both nn.Module and ScriptModule.


   .. py:attribute:: encoder1


   .. py:attribute:: encoder2


   .. py:attribute:: encoder3


   .. py:attribute:: encoder4


   .. py:attribute:: pool


   .. py:attribute:: decoder4


   .. py:attribute:: decoder3


   .. py:attribute:: decoder2


   .. py:attribute:: decoder1


   .. py:attribute:: activation


   .. py:attribute:: config


   .. py:method:: forward(x)


   .. py:method:: train_batch(batch)

      This function contains the logic for a single training step. i.e. the
      contents of the inner loop of a ML training process.

      :param batch: A tuple containing the input data for the current batch, possibly
                    with labels that are ignored.
      :type batch: tuple

      :returns: **Current loss value** -- Dictionary containing the loss value for the current batch.
      :rtype: dict



   .. py:method:: validate_batch(batch)

      This function contains the logic for a single validation step that will
      process a single batch of data. i.e. the contents of the inner loop of a
      ML validation process.

      :param batch: A tuple containing the input data for the current batch, possibly
                    with labels that are ignored.
      :type batch: tuple

      :returns: **Current loss value** -- Dictionary containing the loss value for the current batch.
      :rtype: dict



   .. py:method:: test_batch(batch)

      This function contains the logic for a single testing step that will
      process a single batch of data. i.e. the contents of the inner loop of a
      ML testing process. In this case, it is identical to `validate_batch`.

      :param batch: A tuple containing the input data for the current batch, possibly
                    with labels that are ignored.
      :type batch: tuple

      :returns: **Current loss value** -- Dictionary containing the loss value for the current batch.
      :rtype: dict



   .. py:method:: infer_batch(batch)

      This function contains the logic for a single inference step that will
      process a single batch of data. i.e. the contents of the inner loop of a
      ML inference process.

      :param batch: A tuple containing the input data for the current batch, possibly
                    with labels that are ignored.
      :type batch: tuple

      :returns: **Reconstructed outputs** -- The reconstructed outputs from the autoencoder.
      :rtype: torch.Tensor



