# Config Statements from _DUMP import me me.mark("D") print("Start -- Debug Stat\n") # class declarition class matrix: def __init__(self, Lrows = 3, Lcols = 3): self.rows = Lrows self.cols = Lcols self.Matrix = [[0 for x in range(self.rows)] for y in range(self.cols)] print(self.Matrix) obj = matrix(2,2) print(obj.Matrix) print("\nEnd -- Debug Stat")
from _DUMP import me import numpy me.mark('D') print('Start Prog --Debug Stat \n') class prepceptron: def __init__(self, number_inputsL, biaseL): self.number_inputs = number_inputsL self.biase = biaseL self.output = 9 self.weights = numpy.random.rand(number_inputsL, 1) self.threshold = 0 self.fire = False # self.learning_rate = 0.5 self.input_train = [ [0, 0], [0, 1], [1, 0], ] self.output_train = [0, 1, 1] def start(self, inputL): self.output = 0 for i in range(self.number_inputs): self.output = self.output + inputL[i] * self.weights[i] + self.biase # print(outputL ," --[",self.biase,"] [",self.weights[i],"]") def step_Activator(self, threshold):