Exemple #1
0
 def __init__(self, _bias_):
     self.debug = 1
     if self.debug == 1:
         print ""
         print("Ejecutando " + self.__class__.__name__) + "...\n"
         self.__neuron_0 = nas.neuron(_bias_)
         self.__neuron_1 = nas.neuron(_bias_)
         self.__neuron_2 = nas.neuron(_bias_)
         self.__bias = int(_bias_)
         self.__base_pattern = []
         for base_pattern in range(16):
             self.__base_pattern.append(0)
Exemple #2
0
 def __init__(self, _bias_):
     self.debug = 1
     if self.debug == 1:
         print "\n"
         print ""
         print("Ejecutando " + self.__class__.__name__) + "..."
         self.__neuron = nas.neuron(int(_bias_))
         self.__bias = int(_bias_)
Exemple #3
0
def _layer_1_1_(_neuron, _idnas, _learn):
    def neuron_0():
        _neuron.rst_sign_()
        _neuron.ibn_(0, 0, int(_learn[0]))
        _neuron.ibn_(0, 1, int(_learn[1]))
        _neuron.ibn_(1, 0, int(_learn[2]))
        _neuron.ibn_(1, 1, int(_learn[3]))

    __rst_sign = {
        0: neuron_0,
    }
    __rst_sign[int(_idnas)]()


#Capa neuronal -2 neuronas-
n1 = nas.neuron(1)
n2 = nas.neuron(2)


def _layer_2_1(id_nas, _learn_):
    def neuron_1():
        n1.rst_sign_()
        n1.ibn_(0, 0, int(_learn_[0]))
        n1.ibn_(0, 1, int(_learn_[1]))

    n1.ibn_(1, 0, int(_learn_[2]))
    n1.ibn_(1, 1, int(_learn_[3]))

    def neuron_2():
        n2.rst_sign_()
        n2.ibn_(0, 0, int(_learn_[0]))
Exemple #4
0
    __learn = {
        0: s0,
        1: s1,
        2: s2,
        3: s3,
        4: s4,
        5: s5,
    }
    __learn[int(id_mode)]()
    return _learn_


#Layer neuronal -0- In
#----------------------------------------------------------------------------------------------------------------------------------------------------------
n0 = nas.neuron(0)
n1 = nas.neuron(1)
n2 = nas.neuron(2)
n3 = nas.neuron(3)


def layer_0(id_nas, _learn_):
    def neuron_0():
        n0.rst_sign_()
        n0.ibn_(0, 0, int(_learn_[0]))
        n0.ibn_(0, 1, int(_learn_[1]))
        n0.ibn_(1, 0, int(_learn_[2]))
        n0.ibn_(1, 1, int(_learn_[3]))

    def neuron_1():
        n1.rst_sign_()