nujo/autodiff/_functions/_transform.py
def backward(self, idx: int, accum_grad: Function.T) -> Function.T:
        ''' Method which turns the column shaped input to image shape
        '''

        # Create images placeholder
        images = zeros(self.children[0].shape)

        # Separate the image sections and the batch_size (shape[0])
        separated_grad = accum_grad\
            .reshape(self._n_features, -1, images.shape[0])\
            .transpose(2, 0, 1)  # Move the batch_size at the beginning

        # Fill in the placeholder
        k, i, j = self._im2col_indices
        add.at(images, (slice(None), k, i, j), separated_grad)

        return images
 Method which turns the column shaped input to image shape
        
Method which turns the column shaped input to image shape
Method which turns the column shaped input to image shape
def backward(self, idx: int, accum_grad: Function.T) -> Function.T:
        images = zeros(self.children[0].shape)
        separated_grad = accum_grad\
            .reshape(self._n_features, -1, images.shape[0])\
            .transpose(2, 0, 1)  
        k, i, j = self._im2col_indices
        add.at(images, (slice(None), k, i, j), separated_grad)
        return images
def backward ( self , idx : int , accum_grad : Function . T ) -> Function . T : images = zeros ( self . children [ 0 ] . shape ) separated_grad = accum_grad . reshape ( self . _n_features , - 1 , images . shape [ 0 ] ) . transpose ( 2 , 0 , 1 ) k , i , j = self . _im2col_indices add . at ( images , ( slice ( None ) , k , i , j ) , separated_grad ) return images
Method which turns the column shaped input to image shape
Method which turns the column shaped input to image shape
''' Method which turns the column shaped input to image shape
        ''' # Create images placeholder # Separate the image sections and the batch_size (shape[0]) # Move the batch_size at the beginning # Fill in the placeholder
self
idx
int
accum_grad
Function.T