def size(self) -> int:
        """
        The number of data points in the data loader.

        Returns
        -------
        int
            Number of data points.
        """
        c = 0
        for inputs, targets in self:
            if isinstance(inputs, dict):
                inputs = inputs[list(inputs.keys())[0]]
            c += inputs.shape[0]
        return c

        The number of data points in the data loader.

        Returns
        -------
        int
            Number of data points.
        
fortuna/data/loader/base.py