# Path: brainforge/llatomic/_llactivation.py
# @nb.vectorize(finfout, nopython=True)
# def sigmoid(Z):
#     return s1 / (s1 + np.exp(-Z))
# 
# @nb.vectorize(finfout, nopython=True)
# def sigmoid_p(A):
#     return A * (s1 - A)
# 
# @nb.jit(nopython=True)
# def tanh(Z):
#     return np.tanh(Z)
# 
# @nb.vectorize(finfout, nopython=True)
# def tanh_p(A):
#     return s1 - A ** s2
# 
# @nb.vectorize(finfout, nopython=True)
# def relu(Z):
#     return s0 if s0 >= Z else Z
# 
# @nb.vectorize(finfout, nopython=True)
# def relu_p(A):
#     return s0 if A < s0 else s1


import abc
from ._llactivation import (
    sigmoid, sigmoid_p,
    tanh, tanh_p,
    relu, relu_p,
    # softmax, softmax_p,
)



class LLActivation(abc.ABC):
    type = ""

    def __init__(self):
        self.llact, self.llactp = {
            "sigmoid": (sigmoid, sigmoid_p),
            "tanh": (tanh, tanh_p),

# Path: brainforge/llatomic/_llactivation.py
# @nb.vectorize(finfout, nopython=True)
# def sigmoid(Z):
#     return s1 / (s1 + np.exp(-Z))
# 
# @nb.vectorize(finfout, nopython=True)
# def sigmoid_p(A):
#     return A * (s1 - A)
# 
# @nb.jit(nopython=True)
# def tanh(Z):
#     return np.tanh(Z)
# 
# @nb.vectorize(finfout, nopython=True)
# def tanh_p(A):
#     return s1 - A ** s2
# 
# @nb.vectorize(finfout, nopython=True)
# def relu(Z):
#     return s0 if s0 >= Z else Z
# 
# @nb.vectorize(finfout, nopython=True)
# def relu_p(A):
#     return s0 if A < s0 else s1


# Path: brainforge/llatomic/llactivation_op.py
import abc
from ._llactivation import (
    sigmoid, sigmoid_p,
    tanh, tanh_p,
    relu, relu_p,
    # softmax, softmax_p,
)




class LLActivation(abc.ABC):
    type = ""

    def __init__(self):
        self.llact, self.llactp = {
            "sigmoid": (sigmoid, sigmoid_p),
            "tanh": (tanh, tanh_p),

            "relu": (relu, relu_p)