tx · BQxK6Q9RxFkuvKPme7hUqZ728mZQD9T4F4MFJRiKaPvb

3N3n75UqB8G1GKmXFr4zPhKCjGcqJPRSuJY:  -0.01000000 Waves

2024.04.28 13:49 [3082618] smart account 3N3n75UqB8G1GKmXFr4zPhKCjGcqJPRSuJY > SELF 0.00000000 Waves

{ "type": 13, "id": "BQxK6Q9RxFkuvKPme7hUqZ728mZQD9T4F4MFJRiKaPvb", "fee": 1000000, "feeAssetId": null, "timestamp": 1714301410024, "version": 2, "chainId": 84, "sender": "3N3n75UqB8G1GKmXFr4zPhKCjGcqJPRSuJY", "senderPublicKey": "2AWdnJuBMzufXSjTvzVcawBQQhnhF1iXR6QNVgwn33oc", "proofs": [ "FgWK3zuzQ4YT5ZMvpRZhqRQx4BUT6YS4o32eUH1eBXzTGrh5pCPiRYnsuL4sPicGaYkvqc2advPkQCuyPpFJDsV" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIBAQAAAAkAAAAADWxheWVyMVdlaWdodHMJAARMAAAAAgkABEwAAAACAAAAAAAACSmwCQAETAAAAAIAAAAAAAAJKpwFAAAAA25pbAkABEwAAAACCQAETAAAAAIAAAAAAAAGUfQJAARMAAAAAgAAAAAAAAZSLAUAAAADbmlsBQAAAANuaWwAAAAADGxheWVyMUJpYXNlcwkABEwAAAACAP///////AwVCQAETAAAAAIA///////2TQsFAAAAA25pbAAAAAANbGF5ZXIyV2VpZ2h0cwkABEwAAAACCQAETAAAAAIAAAAAAAAMtcUJAARMAAAAAgD///////JPiwUAAAADbmlsBQAAAANuaWwAAAAADGxheWVyMkJpYXNlcwkABEwAAAACAP//////+i8FBQAAAANuaWwBAAAABmNsYW1wWgAAAAIAAAABegAAAAVsaW1pdAMJAABmAAAAAgUAAAABegUAAAAFbGltaXQFAAAABWxpbWl0AwkAAGYAAAACCQEAAAABLQAAAAEFAAAABWxpbWl0BQAAAAF6CQEAAAABLQAAAAEFAAAABWxpbWl0BQAAAAF6AQAAAApleHBfYXBwcm94AAAAAQA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ZXIyCAUAAAALJHQwMjk0NDMwNDgAAAACXzEEAAAADGxheWVyMk91dHB1dAgFAAAACyR0MDI5NDQzMDQ4AAAAAl8yCQAETgAAAAIJAAROAAAAAgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAGcmVzdWx0BQAAAAxsYXllcjJPdXRwdXQFAAAAA25pbAUAAAALZGVidWdMYXllcjEFAAAAC2RlYnVnTGF5ZXIyAAAAABYAWfQ=", "height": 3082618, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EUk6SP8KWsjHF1LQH8TKBsex2FAUFa7uDWqcmJfKSMsf Next: 5K3SesFjoRF1HkRqSncDmVU95ew5cKw5DxSrJdSM3sXu Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let layer1Weights = [[600497, 600732], [414197, 414253]]
4+let layer1Weights = [[600496, 600732], [414196, 414252]]
55
6-let layer1Biases = [-259050, -635637]
6+let layer1Biases = [-259051, -635637]
77
8-let layer2Weights = [[832966, -897142]]
8+let layer2Weights = [[832965, -897141]]
99
1010 let layer2Biases = [-381179]
1111
1818
1919 func exp_approx (x) = {
2020 let scaled_x = (x / 10000)
21- let scaled_x2 = fraction(scaled_x, scaled_x, 1)
22- let scaled_x3 = fraction(scaled_x2, scaled_x, 1)
23- let exp_result = (((1000000 - scaled_x) + fraction(scaled_x2, 500000, 1, DOWN)) - fraction(scaled_x3, 6000000, 1, DOWN))
21+ let scaled_x2 = fraction(scaled_x, scaled_x, 1, DOWN)
22+ let scaled_x3 = fraction(scaled_x2, scaled_x, 1, DOWN)
23+ let exp_result = (((10000 - fraction(scaled_x, 10, 1, DOWN)) + fraction(scaled_x2, 200, 1, DOWN)) - fraction(scaled_x3, 6000, 1, DOWN))
2424 if ((0 > x))
25- then (1000000 + exp_result)
26- else (1000000 - exp_result)
25+ then (10000 + exp_result)
26+ else (10000 - exp_result)
2727 }
2828
2929
3333 then -(z)
3434 else z
3535 let expValue = exp_approx(-(positiveZ))
36- let sigValue = fraction(1000000, (1000000 + expValue), 1)
36+ let sigValue = fraction(10000, (10000 + expValue), 1, DOWN)
3737 $Tuple2([IntegerEntry((debugPrefix + "inputZ"), z), IntegerEntry((debugPrefix + "clampedZ"), clampedZ), IntegerEntry((debugPrefix + "positiveZ"), positiveZ), IntegerEntry((debugPrefix + "expValue"), expValue), IntegerEntry((debugPrefix + "sigValue"), sigValue)], sigValue)
3838 }
3939
4141 func forwardPassLayer1 (input,weights,biases,debugPrefix) = {
4242 let sum0 = (((input[0] * weights[0][0]) + (input[1] * weights[0][1])) + (biases[0] * 100000))
4343 let sum1 = (((input[0] * weights[1][0]) + (input[1] * weights[1][1])) + (biases[1] * 100000))
44- let $t019802033 = sigmoid(sum0, "Layer1N0")
45- let debugEntries0 = $t019802033._1
46- let sig0 = $t019802033._2
47- let $t020382091 = sigmoid(sum1, "Layer1N1")
48- let debugEntries1 = $t020382091._1
49- let sig1 = $t020382091._2
44+ let $t020552108 = sigmoid(sum0, "Layer1N0")
45+ let debugEntries0 = $t020552108._1
46+ let sig0 = $t020552108._2
47+ let $t021132166 = sigmoid(sum1, "Layer1N1")
48+ let debugEntries1 = $t021132166._1
49+ let sig1 = $t021132166._2
5050 let debugInfo = (debugEntries0 ++ debugEntries1)
5151 let output = [sig0, sig1]
5252 $Tuple2(debugInfo, output)
5555
5656 func forwardPassLayer2 (input,weights,biases,debugPrefix) = {
5757 let sum0 = (((input[0] * weights[0][0]) + (input[1] * weights[0][1])) + (biases[0] * 100000))
58- let $t024012454 = sigmoid(sum0, "Layer2N0")
59- let debugEntries0 = $t024012454._1
60- let sig0 = $t024012454._2
58+ let $t024762529 = sigmoid(sum0, "Layer2N0")
59+ let debugEntries0 = $t024762529._1
60+ let sig0 = $t024762529._2
6161 let debugInfo = debugEntries0
6262 let output = sig0
6363 $Tuple2(debugInfo, output)
7373 then 1000000
7474 else 0
7575 let inputs = [scaledInput1, scaledInput2]
76- let $t027662864 = forwardPassLayer1(inputs, layer1Weights, layer1Biases, "Layer1")
77- let debugLayer1 = $t027662864._1
78- let layer1Output = $t027662864._2
79- let $t028692973 = forwardPassLayer2(layer1Output, layer2Weights, layer2Biases, "Layer2")
80- let debugLayer2 = $t028692973._1
81- let layer2Output = $t028692973._2
76+ let $t028412939 = forwardPassLayer1(inputs, layer1Weights, layer1Biases, "Layer1")
77+ let debugLayer1 = $t028412939._1
78+ let layer1Output = $t028412939._2
79+ let $t029443048 = forwardPassLayer2(layer1Output, layer2Weights, layer2Biases, "Layer2")
80+ let debugLayer2 = $t029443048._1
81+ let layer2Output = $t029443048._2
8282 (([IntegerEntry("result", layer2Output)] ++ debugLayer1) ++ debugLayer2)
8383 }
8484
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let layer1Weights = [[600497, 600732], [414197, 414253]]
4+let layer1Weights = [[600496, 600732], [414196, 414252]]
55
6-let layer1Biases = [-259050, -635637]
6+let layer1Biases = [-259051, -635637]
77
8-let layer2Weights = [[832966, -897142]]
8+let layer2Weights = [[832965, -897141]]
99
1010 let layer2Biases = [-381179]
1111
1212 func clampZ (z,limit) = if ((z > limit))
1313 then limit
1414 else if ((-(limit) > z))
1515 then -(limit)
1616 else z
1717
1818
1919 func exp_approx (x) = {
2020 let scaled_x = (x / 10000)
21- let scaled_x2 = fraction(scaled_x, scaled_x, 1)
22- let scaled_x3 = fraction(scaled_x2, scaled_x, 1)
23- let exp_result = (((1000000 - scaled_x) + fraction(scaled_x2, 500000, 1, DOWN)) - fraction(scaled_x3, 6000000, 1, DOWN))
21+ let scaled_x2 = fraction(scaled_x, scaled_x, 1, DOWN)
22+ let scaled_x3 = fraction(scaled_x2, scaled_x, 1, DOWN)
23+ let exp_result = (((10000 - fraction(scaled_x, 10, 1, DOWN)) + fraction(scaled_x2, 200, 1, DOWN)) - fraction(scaled_x3, 6000, 1, DOWN))
2424 if ((0 > x))
25- then (1000000 + exp_result)
26- else (1000000 - exp_result)
25+ then (10000 + exp_result)
26+ else (10000 - exp_result)
2727 }
2828
2929
3030 func sigmoid (z,debugPrefix) = {
3131 let clampedZ = clampZ(z, 100000)
3232 let positiveZ = if ((0 > z))
3333 then -(z)
3434 else z
3535 let expValue = exp_approx(-(positiveZ))
36- let sigValue = fraction(1000000, (1000000 + expValue), 1)
36+ let sigValue = fraction(10000, (10000 + expValue), 1, DOWN)
3737 $Tuple2([IntegerEntry((debugPrefix + "inputZ"), z), IntegerEntry((debugPrefix + "clampedZ"), clampedZ), IntegerEntry((debugPrefix + "positiveZ"), positiveZ), IntegerEntry((debugPrefix + "expValue"), expValue), IntegerEntry((debugPrefix + "sigValue"), sigValue)], sigValue)
3838 }
3939
4040
4141 func forwardPassLayer1 (input,weights,biases,debugPrefix) = {
4242 let sum0 = (((input[0] * weights[0][0]) + (input[1] * weights[0][1])) + (biases[0] * 100000))
4343 let sum1 = (((input[0] * weights[1][0]) + (input[1] * weights[1][1])) + (biases[1] * 100000))
44- let $t019802033 = sigmoid(sum0, "Layer1N0")
45- let debugEntries0 = $t019802033._1
46- let sig0 = $t019802033._2
47- let $t020382091 = sigmoid(sum1, "Layer1N1")
48- let debugEntries1 = $t020382091._1
49- let sig1 = $t020382091._2
44+ let $t020552108 = sigmoid(sum0, "Layer1N0")
45+ let debugEntries0 = $t020552108._1
46+ let sig0 = $t020552108._2
47+ let $t021132166 = sigmoid(sum1, "Layer1N1")
48+ let debugEntries1 = $t021132166._1
49+ let sig1 = $t021132166._2
5050 let debugInfo = (debugEntries0 ++ debugEntries1)
5151 let output = [sig0, sig1]
5252 $Tuple2(debugInfo, output)
5353 }
5454
5555
5656 func forwardPassLayer2 (input,weights,biases,debugPrefix) = {
5757 let sum0 = (((input[0] * weights[0][0]) + (input[1] * weights[0][1])) + (biases[0] * 100000))
58- let $t024012454 = sigmoid(sum0, "Layer2N0")
59- let debugEntries0 = $t024012454._1
60- let sig0 = $t024012454._2
58+ let $t024762529 = sigmoid(sum0, "Layer2N0")
59+ let debugEntries0 = $t024762529._1
60+ let sig0 = $t024762529._2
6161 let debugInfo = debugEntries0
6262 let output = sig0
6363 $Tuple2(debugInfo, output)
6464 }
6565
6666
6767 @Callable(i)
6868 func predict (input1,input2) = {
6969 let scaledInput1 = if ((input1 == 1))
7070 then 1000000
7171 else 0
7272 let scaledInput2 = if ((input2 == 1))
7373 then 1000000
7474 else 0
7575 let inputs = [scaledInput1, scaledInput2]
76- let $t027662864 = forwardPassLayer1(inputs, layer1Weights, layer1Biases, "Layer1")
77- let debugLayer1 = $t027662864._1
78- let layer1Output = $t027662864._2
79- let $t028692973 = forwardPassLayer2(layer1Output, layer2Weights, layer2Biases, "Layer2")
80- let debugLayer2 = $t028692973._1
81- let layer2Output = $t028692973._2
76+ let $t028412939 = forwardPassLayer1(inputs, layer1Weights, layer1Biases, "Layer1")
77+ let debugLayer1 = $t028412939._1
78+ let layer1Output = $t028412939._2
79+ let $t029443048 = forwardPassLayer2(layer1Output, layer2Weights, layer2Biases, "Layer2")
80+ let debugLayer2 = $t029443048._1
81+ let layer2Output = $t029443048._2
8282 (([IntegerEntry("result", layer2Output)] ++ debugLayer1) ++ debugLayer2)
8383 }
8484
8585

github/deemru/w8io/026f985 
41.71 ms