import torch


def relu(Z: torch.Tensor, k: float=0.0, **kwargs) -> torch.Tensor:
    """
    Z: input of any-shape
    k: 0.0 < k <<< 1.0
    
    output: the same shape as input, and recitifed element-wise
    """
    return torch.maximum(Z, torch.tensor(k) * Z)