-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinputlayer.py
39 lines (28 loc) · 1.19 KB
/
inputlayer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 1 19:58:14 2016
@author: Andi
"""
from neuron import Neuron
class InputLayer():
def __init__(self):
self.__listOfNeurons=[]
self.__numberOfNeuronsInLayer=0
def initLayer(self):
listOfWeightInTemp=[]
for x in range(self.getnumberOfNeuronsInLayer()):
a=Neuron()
listOfWeightInTemp.append(a.initNeuron())
a.setlistofWeightIn(listOfWeightInTemp)
self.__listOfNeurons.append(a)
listOfWeightInTemp=[]
def getlistOfNeurons(self):
return self.__listOfNeurons
def setlistOfNeurons(self,listOfNeurons):
self.__listOfNeurons=listOfNeurons
def getnumberOfNeuronsInLayer(self):
return self.__numberOfNeuronsInLayer
def setnumberOfNeuronsInLayer(self, numberOfNeuronsInLayer):
self.__numberOfNeuronsInLayer=numberOfNeuronsInLayer
listOfNeurons=property(getlistOfNeurons, setlistOfNeurons)
numberOfNeuronsInLayer=property(getnumberOfNeuronsInLayer, setnumberOfNeuronsInLayer)