Пример #1
0
 def __init__(self,input_num=2,function_name='hardlim',weight=None,bias=None,data_set=None,learning_rate=0.2,max_error=0,max_epoch=-1):
     
     TwoLayersNeuralNetwork.__init__(self, input_num, input_num, function_name, weight, bias, data_set,learning_rate,max_error,max_epoch)
     
     for i in range(len(self.net.layer_to_layer_weight['in_to_out'])):
         self.net.layer_to_layer_weight['in_to_out'][i][i]=0
     for i in range(len(self.net.layer_to_layer_weight['in_to_out'])):
         for j in range(len(self.net.layer_to_layer_weight['in_to_out'][0])):
             self.net.layer_to_layer_weight['in_to_out'][i][j]=self.net.layer_to_layer_weight['in_to_out'][j][i]
     self.net.updateNeuronToNeuronWeightByLayerToLayerWeight()
Пример #2
0
 def __init__(
     self,
     input_num=2,
     output_num=2,
     function_name="purelin",
     weight=None,
     bias=None,
     data_set=None,
     learning_rate=0.2,
     max_error=0,
     max_epoch=-1,
 ):
     TwoLayersNeuralNetwork.__init__(
         self, input_num, output_num, function_name, weight, bias, data_set, learning_rate, max_error, max_epoch
     )