tx · CSKB8iCwwXfruTvzLC9tm5jdhrri1eMoeLApwdfSEHCE

3N3n75UqB8G1GKmXFr4zPhKCjGcqJPRSuJY:  -0.01000000 Waves

2024.05.26 19:19 [3123188] smart account 3N3n75UqB8G1GKmXFr4zPhKCjGcqJPRSuJY > SELF 0.00000000 Waves

{ "type": 13, "id": "CSKB8iCwwXfruTvzLC9tm5jdhrri1eMoeLApwdfSEHCE", "fee": 1000000, "feeAssetId": null, "timestamp": 1716740411880, "version": 2, "chainId": 84, "sender": "3N3n75UqB8G1GKmXFr4zPhKCjGcqJPRSuJY", "senderPublicKey": "2AWdnJuBMzufXSjTvzVcawBQQhnhF1iXR6QNVgwn33oc", "proofs": [ "4ZZ9x1GumaFS7MJ9S1NGPoBN9X4xAmfEuCNagn9YkKBgaSMmpYYDeVarG2YLBwo1MyVKRaRi59MdVCWAMikYCWtb" ], "script": "base64:BwIICAISBAoCAQEHAA93ZWlnaHRzX2xheWVyXzEJAMwIAgkAzAgCAJHVAwkAzAgCAKnVAwUDbmlsCQDMCAIJAMwIAgDLwwIJAMwIAgDRwwIFA25pbAUDbmlsAA5iaWFzZXNfbGF5ZXJfMQkAzAgCAM+1/v///////wEJAMwIAgC1j/z///////8BBQNuaWwAD3dlaWdodHNfbGF5ZXJfMgkAzAgCCQDMCAIA4IoFCQDMCAIAjsP6////////AQUDbmlsBQNuaWwADmJpYXNlc19sYXllcl8yCQDMCAIAm9b9////////AQUDbmlsAQ5saW5lYXJfZm9yd2FyZAMFaW5wdXQHd2VpZ2h0cwZiaWFzZXMEDXdlaWdodGVkX3N1bTEJAGQCCQBpAgkAZAIJAGgCCQCRAwIFBWlucHV0AAAJAJEDAgkAkQMCBQd3ZWlnaHRzAAAAAAkAaAIJAJEDAgUFaW5wdXQAAQkAkQMCCQCRAwIFB3dlaWdodHMAAAABAJBOCQCRAwIFBmJpYXNlcwAABA13ZWlnaHRlZF9zdW0yCQBkAgkAaQIJAGQCCQBoAgkAkQMCBQVpbnB1dAAACQC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CRAwIFAmExAAEJAMwIAgkBDEludGVnZXJFbnRyeQICCmRlYnVnX3oyXzEJAJEDAgUCejIAAAkAzAgCCQEMSW50ZWdlckVudHJ5AgIIZGVidWdfYTIFAmEyCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgxkZWJ1Z19yZXN1bHQFBnJlc3VsdAUDbmlsCQCUCgIFDWRlYnVnX291dHB1dHMFBnJlc3VsdABwHcxQ", "height": 3123188, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5iNUFVUiuLxLyD9zsZtxLmY1BS5THCkkmFMT6kNw969S Next: 8bA5jMEQ6Vm9Rh4z9C9TER3GXZ2QKwTuAjWySbzGzVBv Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let weights_layer_1 = [[60050, 60073], [41420, 41425]]
4+let weights_layer_1 = [[60049, 60073], [41419, 41425]]
55
6-let biases_layer_1 = [-25905, -63564]
6+let biases_layer_1 = [-25905, -63563]
77
8-let weights_layer_2 = [[83297, -89714]]
8+let weights_layer_2 = [[83296, -89714]]
99
10-let biases_layer_2 = [-38118]
10+let biases_layer_2 = [-38117]
1111
1212 func linear_forward (input,weights,biases) = {
1313 let weighted_sum1 = ((((input[0] * weights[0][0]) + (input[1] * weights[0][1])) / 10000) + biases[0])
2828
2929 @Callable(i)
3030 func predict (x1,x2) = {
31- let inputs = [(x1 * 10000), (x2 * 10000)]
31+ let x1_scaled = (x1 * 10000)
32+ let x2_scaled = (x2 * 10000)
33+ let inputs = [x1_scaled, x2_scaled]
3234 let z1 = linear_forward(inputs, weights_layer_1, biases_layer_1)
3335 let a1 = sigmoid_activation(z1)
34- let debug_z1_1 = IntegerEntry("debug_z1_1", z1[0])
35- let debug_z1_2 = IntegerEntry("debug_z1_2", z1[1])
36- let debug_a1_1 = IntegerEntry("debug_a1_1", a1[0])
37- let debug_a1_2 = IntegerEntry("debug_a1_2", a1[1])
38- let z2 = ((((a1[0] * weights_layer_2[0][0]) + (a1[1] * weights_layer_2[0][1])) / 10000) + biases_layer_2[0])
39- let a2 = sigmoid(z2)
36+ let z2 = linear_forward(a1, weights_layer_2, biases_layer_2)
37+ let a2 = sigmoid(z2[0])
4038 let result = (a2 / 10000)
41- let debug_z2 = IntegerEntry("debug_z2", z2)
42- let debug_a2 = IntegerEntry("debug_a2", a2)
43- let debug_result = IntegerEntry("debug_result", result)
44- $Tuple2([debug_z1_1, debug_z1_2, debug_a1_1, debug_a1_2, debug_z2, debug_a2, debug_result], result)
39+ let debug_outputs = [IntegerEntry("debug_z1_1", z1[0]), IntegerEntry("debug_a1_1", a1[0]), IntegerEntry("debug_z1_2", z1[1]), IntegerEntry("debug_a1_2", a1[1]), IntegerEntry("debug_z2_1", z2[0]), IntegerEntry("debug_a2", a2), IntegerEntry("debug_result", result)]
40+ $Tuple2(debug_outputs, result)
4541 }
4642
4743
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let weights_layer_1 = [[60050, 60073], [41420, 41425]]
4+let weights_layer_1 = [[60049, 60073], [41419, 41425]]
55
6-let biases_layer_1 = [-25905, -63564]
6+let biases_layer_1 = [-25905, -63563]
77
8-let weights_layer_2 = [[83297, -89714]]
8+let weights_layer_2 = [[83296, -89714]]
99
10-let biases_layer_2 = [-38118]
10+let biases_layer_2 = [-38117]
1111
1212 func linear_forward (input,weights,biases) = {
1313 let weighted_sum1 = ((((input[0] * weights[0][0]) + (input[1] * weights[0][1])) / 10000) + biases[0])
1414 let weighted_sum2 = ((((input[0] * weights[1][0]) + (input[1] * weights[1][1])) / 10000) + biases[1])
1515 [weighted_sum1, weighted_sum2]
1616 }
1717
1818
1919 func sigmoid (input) = if ((-10000 > input))
2020 then 0
2121 else if ((input > 10000))
2222 then 10000
2323 else (5000 + (input / 2))
2424
2525
2626 func sigmoid_activation (inputs) = [sigmoid(inputs[0]), sigmoid(inputs[1])]
2727
2828
2929 @Callable(i)
3030 func predict (x1,x2) = {
31- let inputs = [(x1 * 10000), (x2 * 10000)]
31+ let x1_scaled = (x1 * 10000)
32+ let x2_scaled = (x2 * 10000)
33+ let inputs = [x1_scaled, x2_scaled]
3234 let z1 = linear_forward(inputs, weights_layer_1, biases_layer_1)
3335 let a1 = sigmoid_activation(z1)
34- let debug_z1_1 = IntegerEntry("debug_z1_1", z1[0])
35- let debug_z1_2 = IntegerEntry("debug_z1_2", z1[1])
36- let debug_a1_1 = IntegerEntry("debug_a1_1", a1[0])
37- let debug_a1_2 = IntegerEntry("debug_a1_2", a1[1])
38- let z2 = ((((a1[0] * weights_layer_2[0][0]) + (a1[1] * weights_layer_2[0][1])) / 10000) + biases_layer_2[0])
39- let a2 = sigmoid(z2)
36+ let z2 = linear_forward(a1, weights_layer_2, biases_layer_2)
37+ let a2 = sigmoid(z2[0])
4038 let result = (a2 / 10000)
41- let debug_z2 = IntegerEntry("debug_z2", z2)
42- let debug_a2 = IntegerEntry("debug_a2", a2)
43- let debug_result = IntegerEntry("debug_result", result)
44- $Tuple2([debug_z1_1, debug_z1_2, debug_a1_1, debug_a1_2, debug_z2, debug_a2, debug_result], result)
39+ let debug_outputs = [IntegerEntry("debug_z1_1", z1[0]), IntegerEntry("debug_a1_1", a1[0]), IntegerEntry("debug_z1_2", z1[1]), IntegerEntry("debug_a1_2", a1[1]), IntegerEntry("debug_z2_1", z2[0]), IntegerEntry("debug_a2", a2), IntegerEntry("debug_result", result)]
40+ $Tuple2(debug_outputs, result)
4541 }
4642
4743

github/deemru/w8io/169f3d6 
33.90 ms