stacked_autoencoder.py
def forward(self, image):
        """Forward pass on an image.

        Args:
            image: Tensor of shape [batch, channels, height, width]. Input
                image.

        Returns:
            prev_latent: 4-tensor. Latent space of self._prev_model.
            recons: Current block's reconstruction of prev_latent.
        """
        prev_latent = self._prev_model.full_encode(image)
        recons = self._block.forward(prev_latent.detach())
        return prev_latent, recons
Forward pass on an image.

        Args:
            image: Tensor of shape [batch, channels, height, width]. Input
                image.

        Returns:
            prev_latent: 4-tensor. Latent space of self._prev_model.
            recons: Current block's reconstruction of prev_latent.
        
Forward pass on an image.
Forward pass on an image .
def forward(self, image):
        prev_latent = self._prev_model.full_encode(image)
        recons = self._block.forward(prev_latent.detach())
        return prev_latent, recons
def forward ( self , image ) : prev_latent = self . _prev_model . full_encode ( image ) recons = self . _block . forward ( prev_latent . detach ( ) ) return prev_latent , recons
Forward pass on an image.
Forward pass on an image .
"""Forward pass on an image.

        Args:
            image: Tensor of shape [batch, channels, height, width]. Input
                image.

        Returns:
            prev_latent: 4-tensor. Latent space of self._prev_model.
            recons: Current block's reconstruction of prev_latent.
        """
4-tensor. Latent space of self._prev_model.
recons: Current block's reconstruction of prev_latent.
4 - tensor . Latent space of self . _prev_model . recons : Current block ' s reconstruction of prev_latent .
prev_latent
self
image
Tensor of shape [batch, channels, height, width]. Input
image.
Tensor of shape [ batch channels height width ] . Input image .