def _allocate_memory(self, shape_type_dict: Dict[str, Any]) -> None:
        """
        Allocate memory for data accumulation

        Args:
            shape_type_dict: dict that contains information about shape of each tensor
                and it's dtype
        """
        self.storage = defaultdict(torch.Tensor)
        for key in shape_type_dict:
            self.storage[key] = torch.empty(
                size=shape_type_dict[key]["shape"], dtype=shape_type_dict[key]["dtype"]
            )

        Allocate memory for data accumulation

        Args:
            shape_type_dict: dict that contains information about shape of each tensor
                and it's dtype
        
catalyst/metrics/_accumulative.py