def __init__(self, input_neuron_index, x1, x2, y1, y2):
     self.input_neuron_index = input_neuron_index
     self.weight = random_weight()
     self.signal = 0
     x1, x2, y1, y2 = adjust_line_to_perimeter_of_circle(x1, x2, y1, y2)
     self.x1 = x1
     self.x2 = x2
     self.y1 = y1
     self.y2 = y2
 def set_weight(self, input_neuron_index, x1, x2, y1, y2, weight):
     self.input_neuron_index = input_neuron_index
     self.signal = 0
     x1, x2, y1, y2 = adjust_line_to_perimeter_of_circle(x1, x2, y1, y2)
     self.x1 = x1
     self.x2 = x2
     self.y1 = y1
     self.y2 = y2
     self.weight = weight
示例#3
0
 def __init__(self, input_neuron_index, x1, x2, y1, y2):
     self.input_neuron_index = input_neuron_index
     self.weight = random_weight()
     self.signal = 0
     x1, x2, y1, y2 = adjust_line_to_perimeter_of_circle(x1, x2, y1, y2)
     self.x1 = x1
     self.x2 = x2
     self.y1 = y1
     self.y2 = y2