exportation et importations de réseaux neronaux
This commit is contained in:
parent
dd47f73356
commit
83e220282c
@ -128,4 +128,14 @@ class network:
|
|||||||
return network.__sigmoid(self.activations[layer][neuron], derivative=True) * upperLayerLinksSum
|
return network.__sigmoid(self.activations[layer][neuron], derivative=True) * upperLayerLinksSum
|
||||||
|
|
||||||
def __PartialDerivative(self, layer, neuron, weight):
|
def __PartialDerivative(self, layer, neuron, weight):
|
||||||
return self.__Error(layer, neuron) * self.outputs[layer][weight]
|
return self.__Error(layer, neuron) * self.outputs[layer][weight]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def saveToFile(self, fileName):
|
||||||
|
np.savez(fileName, biases=self.biases, weights=self.weights)
|
||||||
|
|
||||||
|
def loadFromFile(self, fileName):
|
||||||
|
data = np.load(fileName)
|
||||||
|
self.biases = data['biases']
|
||||||
|
self.weights = data['weights']
|
Loading…
Reference in New Issue
Block a user