MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / example

Function example

neural_network/bpnn.py:175–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173
174
175def example():
176
177 x = np.random.randn(10,10)
178 y = np.asarray([[0.8,0.4],[0.4,0.3],[0.34,0.45],[0.67,0.32],
179 [0.88,0.67],[0.78,0.77],[0.55,0.66],[0.55,0.43],[0.54,0.1],
180 [0.1,0.5]])
181
182 model = BPNN()
183 model.add_layer(DenseLayer(10))
184 model.add_layer(DenseLayer(20))
185 model.add_layer(DenseLayer(30))
186 model.add_layer(DenseLayer(2))
187
188 model.build()
189
190 model.summary()
191
192 model.train(xdata=x,ydata=y,train_round=100,accuracy=0.01)
193
194if __name__ == '__main__':
195 example()

Callers 1

bpnn.pyFile · 0.85

Calls 6

add_layerMethod · 0.95
buildMethod · 0.95
summaryMethod · 0.95
trainMethod · 0.95
BPNNClass · 0.85
DenseLayerClass · 0.85

Tested by

no test coverage detected