def _test_result_from_taring(): mynet = Network(3, 2, 3) mynet.create_connections() mynet.feed_forward([1, 1, 1]) print(mynet.output_ouputs) target = [1, 0, 0] mynet.back_propagate(target) mynet.feed_forward([1, 1, 0]) print(mynet.output_ouputs)
def _test_back_propagate(): mynet = Network(4, 2, 3) mynet.create_connections() mynet.feed_forward([1, 1, 1, 1]) print(mynet.output_ouputs) mynet.matrix_who = np.matrix([[0.11, 0.12, 0.13], [0.21, 0.22, 0.23]]) mynet.output_ouputs = np.matrix([[0.1, 0.2, 0.3]]) target = [0.9, 0.8, 0.7] mynet.back_propagate(target)