Skip to content
Snippets Groups Projects
Select Git revision
  • b2754da96dcdae40bb879b3d7ee35e9da4d1652a
  • main default protected
  • jw_sonar
  • v6.0.0 protected
  • interactive-mode-preference
  • bedran_exercise-list
  • add_route_user
  • Jw_sonar_backup
  • exercise_list_filter
  • assignment_filter
  • add_route_assignments
  • move-to-esm-only
  • 6.0.0-dev
  • Pre-alpha
  • 5.0.0
  • Latest
  • 4.2.0
  • 4.1.1
  • 4.1.0
  • 4.0.1
  • 4.0.0
  • 3.5.0
  • 3.4.2
  • 3.4.1
  • 3.3.0
  • 3.2.3
  • 3.2.2
  • 3.2.0
  • 3.1.2
  • 3.1.1
  • 3.1.0
  • 3.0.1
32 results

DojoBackendManager.ts

Blame
  • functional.py 1.05 KiB
    """
    Interface for all the functions implemented in functions.py.
    
    Author: Joao A. Candido Ramos
    """
    
    from functions import *
    
    
    class Functional:
        # operations
        def add(self, x, y):
            return Add(x, y).forward()
    
        def sub(self, x, y):
            return Sub(x, y).forward()
    
        def mul(self, x, y):
            return Mul(x, y).forward()
    
        def matmul(self, x, y):
            return MatMul(x, y).forward()
    
        def div(self, x, y):
            return Div(x, y).forward()
    
        def exp(self, x):
            return Exp(x).forward()
    
        def log(self, x):
            return Log(x).forward()
    
        def sin(self, x):
            return Sin(x).forward()
    
        def cos(self, x):
            return Cos(x).forward()
    
        def tan(self, x):
            return Tan(x).forward()
    
        # activations
        def sigmoid(self, x):
            return Sigmoid(x).forward()
    
        def tanh(self, x):
            return Tanh(x).forward()
    
        def relu(self, x):
            return ReLu(x).forward()
    
        def softmax(self, x, dim):
            return Softmax(x, dim).forward()
    
    
    F = Functional()
    
    if __name__ == "__main__":
        pass