tx · JCkBbNxDPwS9TmpCQ9srGadxFoSNr8BhMnsUqjfEDxmf

3N3n75UqB8G1GKmXFr4zPhKCjGcqJPRSuJY:  -0.01000000 Waves

2024.04.28 12:38 [3082536] smart account 3N3n75UqB8G1GKmXFr4zPhKCjGcqJPRSuJY > SELF 0.00000000 Waves

{ "type": 13, "id": "JCkBbNxDPwS9TmpCQ9srGadxFoSNr8BhMnsUqjfEDxmf", "fee": 1000000, "feeAssetId": null, "timestamp": 1714297104684, "version": 2, "chainId": 84, "sender": "3N3n75UqB8G1GKmXFr4zPhKCjGcqJPRSuJY", "senderPublicKey": "2AWdnJuBMzufXSjTvzVcawBQQhnhF1iXR6QNVgwn33oc", "proofs": [ "2TP622WAknAZtppM1mDrE3x4GagsULA4kg3riju4Dt74ByM3HruBsU6midTfp6iFK5sEUwao8vdbd19JEEifH547" ], "script": "base64:AAIFAAAAAAAAAAgIAhIECgIBAQAAAAgAAAAADWxheWVyMVdlaWdodHMJAARMAAAAAgkABEwAAAACAAAAAAAACSmxCQAETAAAAAIAAAAAAAAJKp0FAAAAA25pbAkABEwAAAACCQAETAAAAAIAAAAAAAAGUfUJAARMAAAAAgAAAAAAAAZSLAUAAAADbmlsBQAAAANuaWwAAAAADGxheWVyMUJpYXNlcwkABEwAAAACAP///////AwWCQAETAAAAAIA///////2TQoFAAAAA25pbAAAAAANbGF5ZXIyV2VpZ2h0cwkABEwAAAACCQAETAAAAAIAAAAAAAAMtcYJAARMAAAAAgD///////JPiwUAAAADbmlsBQAAAANuaWwAAAAADGxheWVyMkJpYXNlcwkABEwAAAACAP//////+i8FBQAAAANuaWwBAAAACmV4cF9hcHByb3gAAAABAAAAAXgEAAAABXNjYWxlAAAAAAAAAYagAwkAAGYAAAACCQAAaAAAAAIA//////////oFAAAABXNjYWxlBQAAAAF4AAAAAAAAAAABAwkAAGYAAAACBQAAAAF4CQAAaAAAAAIAAAAAAAAAAAYFAAAABXNjYWxlBQAAAAVzY2FsZQQAAAAMY29lZmZpY2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QwMjcyMjI4MjYJAQAAABFmb3J3YXJkUGFzc0xheWVyMgAAAAQFAAAADGxheWVyMU91dHB1dAUAAAANbGF5ZXIyV2VpZ2h0cwUAAAAMbGF5ZXIyQmlhc2VzAgAAAAZMYXllcjIEAAAAC2RlYnVnTGF5ZXIyCAUAAAALJHQwMjcyMjI4MjYAAAACXzEEAAAADGxheWVyMk91dHB1dAgFAAAACyR0MDI3MjIyODI2AAAAAl8yCQAETgAAAAIJAAROAAAAAgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAGcmVzdWx0BQAAAAxsYXllcjJPdXRwdXQFAAAAA25pbAUAAAALZGVidWdMYXllcjEFAAAAC2RlYnVnTGF5ZXIyAAAAAGwGHDc=", "height": 3082536, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EATSuZcqxZ3f4MpdgivbU9TvBRaU6kTdhJqYqJQa4wae Next: 4mYq43JfanRZQyBETXNzpVZnazq9HeDF1xkokwGuKXa5 Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let layer1Weights = [[600497, 600732], [414197, 414252]]
4+let layer1Weights = [[600497, 600733], [414197, 414252]]
55
6-let layer1Biases = [-259050, -635637]
6+let layer1Biases = [-259050, -635638]
77
8-let layer2Weights = [[832966, -897142]]
8+let layer2Weights = [[832966, -897141]]
99
1010 let layer2Biases = [-381179]
1111
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let layer1Weights = [[600497, 600732], [414197, 414252]]
4+let layer1Weights = [[600497, 600733], [414197, 414252]]
55
6-let layer1Biases = [-259050, -635637]
6+let layer1Biases = [-259050, -635638]
77
8-let layer2Weights = [[832966, -897142]]
8+let layer2Weights = [[832966, -897141]]
99
1010 let layer2Biases = [-381179]
1111
1212 func exp_approx (x) = {
1313 let scale = 100000
1414 if (((-6 * scale) > x))
1515 then 1
1616 else if ((x > (6 * scale)))
1717 then scale
1818 else {
1919 let coefficients = [$Tuple2(60000, (scale - 1)), $Tuple2(50000, (scale - 2)), $Tuple2(40000, (scale - 3)), $Tuple2(30000, (scale - 10)), $Tuple2(20000, (scale - 20)), $Tuple2(10000, (scale - 30)), $Tuple2(0, scale), $Tuple2(-10000, (scale + 30)), $Tuple2(-20000, (scale + 20)), $Tuple2(-30000, (scale + 10)), $Tuple2(-40000, (scale + 3)), $Tuple2(-50000, (scale + 2)), $Tuple2(-60000, (scale + 1))]
2020 let index = ((x + 60000) / 10000)
2121 let $t0926968 = coefficients[index]
2222 let coefficient = $t0926968._1
2323 let y = $t0926968._2
2424 y
2525 }
2626 }
2727
2828
2929 func sigmoid (z,debugPrefix) = {
3030 let base = 100000
3131 let positiveZ = if ((0 > z))
3232 then -(z)
3333 else z
3434 let expValue = exp_approx(positiveZ)
3535 let sigValue = (base - ((base * base) / (base + expValue)))
3636 $Tuple2([IntegerEntry((debugPrefix + "positiveZ"), positiveZ), IntegerEntry((debugPrefix + "expValue"), expValue), IntegerEntry((debugPrefix + "sigValue"), sigValue)], sigValue)
3737 }
3838
3939
4040 func forwardPassLayer1 (input,weights,biases,debugPrefix) = {
4141 let sum0 = (((input[0] * weights[0][0]) + (input[1] * weights[0][1])) + (biases[0] * 100000))
4242 let sum1 = (((input[0] * weights[1][0]) + (input[1] * weights[1][1])) + (biases[1] * 100000))
4343 let $t018331886 = sigmoid(sum0, "Layer1N0")
4444 let debugEntries0 = $t018331886._1
4545 let sig0 = $t018331886._2
4646 let $t018911944 = sigmoid(sum1, "Layer1N1")
4747 let debugEntries1 = $t018911944._1
4848 let sig1 = $t018911944._2
4949 let debugInfo = (debugEntries0 ++ debugEntries1)
5050 let output = [sig0, sig1]
5151 $Tuple2(debugInfo, output)
5252 }
5353
5454
5555 func forwardPassLayer2 (input,weights,biases,debugPrefix) = {
5656 let sum0 = (((input[0] * weights[0][0]) + (input[1] * weights[0][1])) + (biases[0] * 100000))
5757 let $t022542307 = sigmoid(sum0, "Layer2N0")
5858 let debugEntries0 = $t022542307._1
5959 let sig0 = $t022542307._2
6060 let debugInfo = debugEntries0
6161 let output = sig0
6262 $Tuple2(debugInfo, output)
6363 }
6464
6565
6666 @Callable(i)
6767 func predict (input1,input2) = {
6868 let scaledInput1 = if ((input1 == 1))
6969 then 1000000
7070 else 0
7171 let scaledInput2 = if ((input2 == 1))
7272 then 1000000
7373 else 0
7474 let inputs = [scaledInput1, scaledInput2]
7575 let $t026192717 = forwardPassLayer1(inputs, layer1Weights, layer1Biases, "Layer1")
7676 let debugLayer1 = $t026192717._1
7777 let layer1Output = $t026192717._2
7878 let $t027222826 = forwardPassLayer2(layer1Output, layer2Weights, layer2Biases, "Layer2")
7979 let debugLayer2 = $t027222826._1
8080 let layer2Output = $t027222826._2
8181 (([IntegerEntry("result", layer2Output)] ++ debugLayer1) ++ debugLayer2)
8282 }
8383
8484

github/deemru/w8io/026f985 
38.68 ms