-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af8e0cb
commit 94fdc84
Showing
11 changed files
with
185 additions
and
54 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
epoch,cps | ||
0,3 | ||
0,8 | ||
1,9 | ||
2,9 | ||
3,6 | ||
4,1 |
103 changes: 103 additions & 0 deletions
103
zkml_geiger/ML_third_attempt/motema_three/inference/Scarb.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# Code generated by scarb DO NOT EDIT. | ||
version = 1 | ||
|
||
[[package]] | ||
name = "_constant_1_value" | ||
version = "0.1.0" | ||
dependencies = [ | ||
"orion", | ||
] | ||
|
||
[[package]] | ||
name = "_constant_2_value" | ||
version = "0.1.0" | ||
dependencies = [ | ||
"orion", | ||
] | ||
|
||
[[package]] | ||
name = "_constant_3_value" | ||
version = "0.1.0" | ||
dependencies = [ | ||
"orion", | ||
] | ||
|
||
[[package]] | ||
name = "_constant_value" | ||
version = "0.1.0" | ||
dependencies = [ | ||
"orion", | ||
] | ||
|
||
[[package]] | ||
name = "alexandria_data_structures" | ||
version = "0.2.0" | ||
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=800f5ad#800f5ad217847b5ded63c0302a444161766ee9d6" | ||
dependencies = [ | ||
"alexandria_encoding", | ||
] | ||
|
||
[[package]] | ||
name = "alexandria_encoding" | ||
version = "0.1.0" | ||
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=800f5ad#800f5ad217847b5ded63c0302a444161766ee9d6" | ||
dependencies = [ | ||
"alexandria_math", | ||
"alexandria_numeric", | ||
] | ||
|
||
[[package]] | ||
name = "alexandria_math" | ||
version = "0.2.0" | ||
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=800f5ad#800f5ad217847b5ded63c0302a444161766ee9d6" | ||
dependencies = [ | ||
"alexandria_data_structures", | ||
] | ||
|
||
[[package]] | ||
name = "alexandria_merkle_tree" | ||
version = "0.1.0" | ||
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=800f5ad#800f5ad217847b5ded63c0302a444161766ee9d6" | ||
|
||
[[package]] | ||
name = "alexandria_numeric" | ||
version = "0.1.0" | ||
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=800f5ad#800f5ad217847b5ded63c0302a444161766ee9d6" | ||
dependencies = [ | ||
"alexandria_math", | ||
] | ||
|
||
[[package]] | ||
name = "alexandria_sorting" | ||
version = "0.1.0" | ||
source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=800f5ad#800f5ad217847b5ded63c0302a444161766ee9d6" | ||
dependencies = [ | ||
"alexandria_data_structures", | ||
] | ||
|
||
[[package]] | ||
name = "cubit" | ||
version = "1.3.0" | ||
source = "git+https://github.com/influenceth/cubit.git?rev=6275608#62756082bf2555d7ab25c69d9c7bc30574ff1ce8" | ||
|
||
[[package]] | ||
name = "inference" | ||
version = "0.1.0" | ||
dependencies = [ | ||
"_constant_1_value", | ||
"_constant_2_value", | ||
"_constant_3_value", | ||
"_constant_value", | ||
"orion", | ||
] | ||
|
||
[[package]] | ||
name = "orion" | ||
version = "0.2.3" | ||
source = "git+https://github.com/gizatechxyz/orion.git?rev=7d84a42#7d84a423a1605548fcaf40d112f4e2d8fc5485bb" | ||
dependencies = [ | ||
"alexandria_data_structures", | ||
"alexandria_merkle_tree", | ||
"alexandria_sorting", | ||
"cubit", | ||
] |
24 changes: 5 additions & 19 deletions
24
zkml_geiger/ML_third_attempt/motema_three/inference/src/lib.cairo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
use orion::operators::tensor::{Tensor, TensorTrait}; | ||
use orion::operators::nn::{NNTrait, FP16x16NN}; | ||
use orion::operators::tensor::{U32Tensor, I32Tensor, I8Tensor, FP8x23Tensor, FP16x16Tensor, FP32x32Tensor, BoolTensor}; | ||
use orion::numbers::{FP8x23, FP16x16, FP32x32}; | ||
use orion::numbers::{FP8x23, FP16x16, FP32x32, FixedTrait}; | ||
use orion::operators::matrix::{MutMatrix, MutMatrixImpl}; | ||
|
||
|
||
use _constant_value::get__constant_value; | ||
use _constant_1_value::get__constant_1_value; | ||
use _constant_2_value::get__constant_2_value; | ||
use _constant_3_value::get__constant_3_value; | ||
|
||
fn main(node_input: Tensor<FP16x16>) -> Tensor<FP16x16> { | ||
let node__constant_output_0 = get__constant_value(); | ||
let node__max_output_0 = | ||
let node__constant_1_output_0 = get__constant_1_value(); | ||
let node__sub_output_0 = TensorTrait::sub(node_input, node__constant_1_output_0); | ||
let node__constant_2_output_0 = get__constant_2_value(); | ||
let node__max_1_output_0 = // Operator Max is not yet supported by the Giza transpiler. If Orion supports it, consider manual implementation.; | ||
let node__sub_1_output_0 = TensorTrait::sub(node__max_output_0, node__max_1_output_0); | ||
let node__constant_3_output_0 = get__constant_3_value(); | ||
let node_output = TensorTrait::add(node__sub_1_output_0, node__constant_3_output_0); | ||
|
||
node_output | ||
} | ||
let kappa = FixedTrait::from_felt(10); | ||
return NNTrait::leaky_relu(@node_input, @kappa); | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters