2017-12-20 22 views
0

저는 1/0,1 * 1, 1 * 2, ... 1 * 9와 같은 기본 곱셈을 수행하는 방법을 학습하는 신경 회로망에서 작업 해 왔습니다. 위의 값을 두 개의 입력으로 매핑합니다 (1, 0.0; 1, 0.1; 1, 0.2; ... 1, 0.9. 나의 초기 아이디어는 다음과 같은 10 개의 출력 노드를 사용하는 것이었다 : 입력 1, 0.5에 대해 출력 0000010000을 가질 것이다.단일 출력 노드를 사용할 때만 학습하는 신경망

Run: 0; input: 1.0 and 0.0; calc. output: 0 outputs: [0.94048536, 0.75189143, 0.90448654, 0.84964263, 0.92710346, 0.9205896, 0.9166514, 0.9185999, 0.795943, 0.81590974] 
Run: 0; input: 1.0 and 0.1; calc. output: 0 outputs: [0.94168836, 0.6586949, 0.88201404, 0.7996992, 0.9125166, 0.9040279, 0.8969305, 0.9007438, 0.72104955, 0.74867773] 
Run: 0; input: 1.0 and 0.2; calc. output: 1 outputs: [0.59459364, 0.626284, 0.5367963, 0.37009117, 0.5410054, 0.5135251, 0.45009533, 0.5312547, 0.3342563, 0.34696856] 
Run: 0; input: 1.0 and 0.3; calc. output: 2 outputs: [0.30291027, 0.3520163, 0.69235265, 0.24563757, 0.3124528, 0.24798703, 0.2366348, 0.36106965, 0.24116497, 0.23960127] 
Run: 0; input: 1.0 and 0.4; calc. output: 3 outputs: [0.14643292, 0.14488237, 0.20816484, 0.7138216, 0.14679325, 0.14442608, 0.14322245, 0.14553475, 0.14529803, 0.14485884] 
Run: 0; input: 1.0 and 0.5; calc. output: 4 outputs: [0.111300476, 0.11054926, 0.12775657, 0.17022455, 0.517143, 0.11048156, 0.10996126, 0.11087219, 0.11077163, 0.11069376] 
Run: 0; input: 1.0 and 0.6; calc. output: 5 outputs: [0.091701485, 0.091235556, 0.100025855, 0.113540664, 0.079323635, 0.40588042, 0.090913385, 0.09137165, 0.09132192, 0.09130932] 
Run: 0; input: 1.0 and 0.7; calc. output: 6 outputs: [0.07876296, 0.07844582, 0.08373607, 0.090930566, 0.07063774, 0.075600885, 0.33777672, 0.07862692, 0.07864317, 0.078639545] 
Run: 0; input: 1.0 and 0.8; calc. output: 7 outputs: [0.069422215, 0.069256335, 0.07245374, 0.07753391, 0.06380278, 0.06732645, 0.078282, 0.29474476, 0.06972643, 0.06970157] 
Run: 0; input: 1.0 and 0.9; calc. output: 8 outputs: [0.062300637, 0.062199928, 0.06432947, 0.06806077, 0.05821499, 0.0608177, 0.06845653, 0.07952615, 0.26235205, 0.06267065] 
MSE avg. slope: 29.733704 


Run: 71656; input: 1.0 and 0.0; calc. output: 9 outputs: [0.010279003, 0.02896637, 0.043276917, 0.053958114, 0.0630066, 0.071741395, 0.08170587, 0.095196836, 0.1174955, 0.2159805] 
Run: 71656; input: 1.0 and 0.1; calc. output: 9 outputs: [0.0103677455, 0.028743964, 0.042845763, 0.053532414, 0.06259656, 0.07137894, 0.08135815, 0.09476117, 0.11689092, 0.21750201] 
Run: 71656; input: 1.0 and 0.2; calc. output: 9 outputs: [0.010355595, 0.031080922, 0.042447396, 0.052969296, 0.06184091, 0.07039538, 0.08002176, 0.092763215, 0.113420375, 0.20233525] 
Run: 71656; input: 1.0 and 0.3; calc. output: 9 outputs: [0.010345513, 0.030882018, 0.051248915, 0.052218866, 0.060734913, 0.06885447, 0.07785396, 0.08951517, 0.10782931, 0.1783656] 
Run: 71656; input: 1.0 and 0.4; calc. output: 9 outputs: [0.010335368, 0.030656299, 0.050334506, 0.07143845, 0.059316203, 0.06685822, 0.07505537, 0.085399605, 0.100998335, 0.15348937] 
Run: 71656; input: 1.0 and 0.5; calc. output: 9 outputs: [0.0103242155, 0.030395139, 0.049267467, 0.06860315, 0.09226974, 0.06452598, 0.071837306, 0.08079469, 0.09371151, 0.13176109] 
Run: 71656; input: 1.0 and 0.6; calc. output: 9 outputs: [0.010311599, 0.030096399, 0.048070885, 0.0655594, 0.0853547, 0.114023075, 0.06839305, 0.076017134, 0.08652923, 0.114047475] 
Run: 71656; input: 1.0 and 0.7; calc. output: 6 outputs: [0.010297287, 0.02976092, 0.046773087, 0.062431496, 0.0788379, 0.09977333, 0.13687406, 0.07129724, 0.079778984, 0.09988401] 
Run: 71656; input: 1.0 and 0.8; calc. output: 7 outputs: [0.010281161, 0.029391168, 0.045403145, 0.05931676, 0.07286063, 0.088408194, 0.11082662, 0.16097555, 0.07361035, 0.088530056] 
Run: 71656; input: 1.0 and 0.9; calc. output: 8 outputs: [0.010263171, 0.028990407, 0.04398821, 0.05628488, 0.067463, 0.07921742, 0.09398328, 0.117479034, 0.18689476, 0.07932637] 
MSE avg. slope: 20.656487 

MSE는 평균 : 그래서, 제 2 입력 값이 나타내는 위치에 상기 출력 노드는 가장 큰 문제는 네트워크 그런 알아 없다는 것이다 값 1

있어야한다. 슬로프는 예상 결과에서 우리가 얼마나 멀어 졌는지를 나타내는 지표입니다. 계산. 출력은 9 개의 출력 노드로부터 최대 값을 검출하는 기능입니다. 출력은 9 개 노드의 실제 출력입니다.

흥미로운 부분은 그 나는, 단일 출력 뉴런 하나에 내 네트워크를 변환하면되도록 : 1 * 0.3 상하는 0.3, 다음 모든 작품 :

Run: 0; input: 1.0 and 0.0; calc. output: 0.7 outputs: [0.73059195] 
Run: 0; input: 1.0 and 0.1; calc. output: 0.7 outputs: [0.6943731] 
Run: 0; input: 1.0 and 0.2; calc. output: 0.6 outputs: [0.59459066] 
Run: 0; input: 1.0 and 0.3; calc. output: 0.5 outputs: [0.47402766] 
Run: 0; input: 1.0 and 0.4; calc. output: 0.4 outputs: [0.40803587] 
Run: 0; input: 1.0 and 0.5; calc. output: 0.4 outputs: [0.40256947] 
Run: 0; input: 1.0 and 0.6; calc. output: 0.4 outputs: [0.4390238] 
Run: 0; input: 1.0 and 0.7; calc. output: 0.5 outputs: [0.51111925] 
Run: 0; input: 1.0 and 0.8; calc. output: 0.6 outputs: [0.61495394] 
Run: 0; input: 1.0 and 0.9; calc. output: 0.7 outputs: [0.7283057] 
MSE avg. slope: 6.411294 


Run: 1059; input: 1.0 and 0.0; calc. output: 0.0 outputs: [0.07036249] 
Run: 1059; input: 1.0 and 0.1; calc. output: 0.1 outputs: [0.12572113] 
Run: 1059; input: 1.0 and 0.2; calc. output: 0.2 outputs: [0.20584798] 
Run: 1059; input: 1.0 and 0.3; calc. output: 0.3 outputs: [0.30965355] 
Run: 1059; input: 1.0 and 0.4; calc. output: 0.4 outputs: [0.42281863] 
Run: 1059; input: 1.0 and 0.5; calc. output: 0.5 outputs: [0.52661973] 
Run: 1059; input: 1.0 and 0.6; calc. output: 0.6 outputs: [0.61548316] 
Run: 1059; input: 1.0 and 0.7; calc. output: 0.7 outputs: [0.6934447] 
Run: 1059; input: 1.0 and 0.8; calc. output: 0.8 outputs: [0.76261413] 
Run: 1059; input: 1.0 and 0.9; calc. output: 0.8 outputs: [0.82081395] 
MSE avg. slope: 1.1993817 

은 사람이 무엇을 어떤 생각을 가지고 있습니까 이유는 무엇일까요? 열심히 제안을 기다리고있을 것입니다. 모두에게 좋은 날!

+0

, 어쩌면 문제를 – XtremeBaumer

+0

HTTPS있다 : //ufile.io/0vx6l 이것은 여러 개의 출력이있는 것입니다. –

+0

https://ufile.io/toc0t 이것은 작동 하나 출력이 하나뿐입니다. 성급한 답장 Baumer에게 감사드립니다! –

답변

0

결국 문제가 발견되었습니다. 코드에서 각 기원 이후 평균 경사 값을 재설정하지 않았지만 여전히 학습 속도로 사용하고있었습니다.

이것은 각 단계에서 과도한 체중 이동으로 이어집니다. 결과적으로 0으로의 수렴으로 이어 지므로 평균 오차는 상당히 낮습니다. 평균 경사도는 초기 값보다 낮지 만 여전히 커졌습니다.

올바르게 재설정하면 네트워크가 충분히 적합했을 때 정확하게 반영됩니다 (어느 곳에서든지 < 0.711).

내가 도움을 많이 받았습니다 : Strange convergence in simple Neural Network
https://www.youtube.com/watch?v=Gvq9sUHPgrc (비용 FUNC 비디오의 기울기를 giant_neural_network.) https://www.youtube.com/watch?v=tIeHLnjs5U8 (3Blue1Brown 역 전파 비디오)

일부 코드가 도움이 될 수