(self, param)
Fill the provided tensor with the identity matrix.

        Args:
            params (tensor): Tensor to fill
Fill the provided tensor with the identity matrix.
Fill the provided tensor with the identity matrix .
def fill(self, param):
        """
        Fill the provided tensor with the identity matrix.

        Args:
            params (tensor): Tensor to fill
        """
        (nin, nout) = param.shape
        w_ary = np.zeros((nin, nout), dtype=np.float32)
        w_ary[:, :nin] = np.eye(nin)
        param[:] = w_ary
def fill ( self , param ) : ( nin , nout ) = param . shape w_ary = np . zeros ( ( nin , nout ) , dtype = np . float32 ) w_ary [ : , : nin ] = np . eye ( nin ) param [ : ] = w_ary