def __init__(self): """ Tanh constructor """ Module.__init__(self) self.s = None
def __init__(self): """ LossCrossEntropy constructor """ Module.__init__(self) self.y = None self.target = None self.target_onehot = None
def __init__(self): """ LossMSE constructor """ Module.__init__(self) self.y = None self.target = None self.e = None self.n = None
def __init__(self, alpha=0.01): """ LeakyReLU constructor :param alpha: non-negative float :raises ValueError, if `alpha` is not a non-negative float """ if not isinstance(alpha, float) or alpha < 0: raise ValueError("LeakyReLU alpha must be a non-negative float") Module.__init__(self) self.alpha = alpha self.s = None
def __init__(self): """ Sigmoid constructor """ Module.__init__(self) self.s = None