-
Notifications
You must be signed in to change notification settings - Fork 0
/
11_Inputs.js
63 lines (57 loc) · 2.45 KB
/
11_Inputs.js
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
let inpPerplexity;
let inpTradeOff;
function CreateTheInputs(){
let SizeOfInput=[60,20];
inpPerplexity=createInput((DesiredPerplexity).toString());
inpPerplexity.size(SizeOfInput[0],SizeOfInput[1]);
inpPerplexity.position(370,39);
inpPerplexity.input(myInputPerplexity);
inpLearningRatio=createInput((LearningRatio).toString());
inpLearningRatio.size(SizeOfInput[0],SizeOfInput[1]);
inpLearningRatio.position(626,25);
inpLearningRatio.input(myInputLearningRatio);
inpMomentum=createInput((Momentum).toString());
inpMomentum.size(SizeOfInput[0],SizeOfInput[1]);
inpMomentum.position(626,52);
inpMomentum.input(myInputMomentum);
inpTradeOff=createInput((TradeOff).toString());
inpTradeOff.size(SizeOfInput[0],SizeOfInput[1]);
inpTradeOff.position(810,39);
inpTradeOff.input(myInputTradeOff);
inpEarlyExaggerationIterations=createInput((EarlyExaggeration.Iterations).toString());
inpEarlyExaggerationIterations.size(SizeOfInput[0],SizeOfInput[1]);
inpEarlyExaggerationIterations.position(1007,25);
inpEarlyExaggerationIterations.input(myInputEarlyExaggerationIterations);
inpEarlyExaggerationFactor=createInput((EarlyExaggeration.Factor).toString());
inpEarlyExaggerationFactor.size(SizeOfInput[0],SizeOfInput[1]);
inpEarlyExaggerationFactor.position(1007,52);
inpEarlyExaggerationFactor.input(myInputEarlyExaggerationFactor);
function myInputPerplexity(){
DesiredPerplexity = UpdateComponent(inpPerplexity);
TradeOff = UpdateComponent(inpTradeOff);
LearningRatio = UpdateComponent(inpLearningRatio);
shouldIStartAllOverAgain = true;
Momentum = UpdateComponent(inpMomentum);
}
function myInputTradeOff(){
TradeOff = UpdateComponent(inpTradeOff) * 1.73;
}
function myInputLearningRatio(){
LearningRatio = UpdateComponent(inpLearningRatio) * 4;
}
function myInputMomentum(){
Momentum = UpdateComponent(inpMomentum);
}
function myInputEarlyExaggerationIterations(){
EarlyExaggeration.Iterations = UpdateComponent(inpEarlyExaggerationIterations);
}
function myInputEarlyExaggerationFactor(){
EarlyExaggeration.Factor = UpdateComponent(inpEarlyExaggerationFactor);
}
}
function UpdateComponent(ComponentOfDOM){
if(ComponentOfDOM.elt.value==''){
return 0;
}
return parseFloat(ComponentOfDOM.elt.value);
}