From c66c0ae87a3a71d02d38ba90c9114f81ebbe66a4 Mon Sep 17 00:00:00 2001 From: eynard Date: Tue, 11 Jan 2022 10:35:01 +0100 Subject: [PATCH] debut model --- sobek/network.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sobek/network.py b/sobek/network.py index 8d02041..527d3c3 100755 --- a/sobek/network.py +++ b/sobek/network.py @@ -115,6 +115,7 @@ class network: for layerNumber in range(len(errorSumsWeights)-1, -1, -1): for neuronNumber in range(len(errorSumsWeights[layerNumber])): errorSumsBiases[layerNumber][neuronNumber] += self.__Error(layerNumber, neuronNumber) + #eventuellemtn sortir de boucle errorSumsWeights[layerNumber][neuronNumber] = np.dot(errorSumsBiases[layerNumber][neuronNumber],self.outputs[layerNumber]) total = 0 @@ -179,4 +180,17 @@ class network: def networkFromFile(fileName): with open(fileName, "rb") as file: - return pickle.load(file) \ No newline at end of file + return pickle.load(file) + + + + +class model: + + def __init__(self, inputWidth, inputHeight, inputChannels): + self.inputWidth = inputWidth + self.inputHeight = inputHeight + self.inputChannels = inputChannels + self.layers = [] + + def add(layerType, activation):