def grad_cam(feat, grad):
    """

    Args:
        feat:  CxHxW
        grad:  CxHxW

    Returns:
           cam: HxW
    """
    exp = (feat * grad.mean((1, 2), keepdims=True)).mean(axis=0)
    exp = np.maximum(-exp, 0)
    return exp


    Args:
        feat:  CxHxW
        grad:  CxHxW

    Returns:
           cam: HxW
    
ppdet/utils/cam_utils.py