示例#1
0
文件: lift.py 项目: syntapy/normad
    def __init__(self, neuron=None, seed=5, Na=None, Nb=None):
        if neuron == None:
            self.neuron = lif.net(seed=seed)
        else:
            self.neuron = neuron

        self.N = self.neuron.N_hidden
        self.neuron.T = 50
        self.T = self.neuron.T
        if Na == None:
            self.na, self.nb = 2 * self.N, 6 * self.N
        else:
            self.na, self.nb = Na[0], Na[1]

        if Nb == None:
            self.ma, self.mb = self.na / 2, self.nb / 2
        else:
            self.ma, self.mb = Nb[0], Nb[1]
示例#2
0
    def __init__(self, neuron=None, seed=5, Na=None, Nb=None):
        if neuron == None:
            self.neuron = lif.net(seed=seed)
        else:
            self.neuron = neuron

        self.N = self.neuron.N_hidden
        self.neuron.T = 50
        self.T = self.neuron.T
        if Na == None:
            self.na, self.nb = 2 * self.N, 6 * self.N
        else:
            self.na, self.nb = Na[0], Na[1]

        if Nb == None:
            self.ma, self.mb = self.na / 2, self.nb / 2
        else:
            self.ma, self.mb = Nb[0], Nb[1]
示例#3
0
import lif
import lift
import pudb
import brian2 as br
import train

#nn.read_image(0)
#nn.run(50)
#train.resume_update_output_weights(nn)
#train.resume_update_hidden_weights(nn)
#nn.run(40)
nn = lif.net(N_hidden=16, N_input=4)
nn.train(0, 1)