file_path
stringlengths
7
180
content
stringlengths
0
811k
repo
stringclasses
11 values
tests/nodes/conv_2D_with_padding.cairo
mod input_0; mod input_1; mod output_0; use orion::numbers::FixedTrait; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_2D_with_padding() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_padding/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(5); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 1507328, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_padding/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_padding/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 6488064, sign: false }); data.append(FP16x16 { mag: 7077888, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 9437184, sign: false }); data.append(FP16x16 { mag: 10027008, sign: false }); data.append(FP16x16 { mag: 10616832, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_strides_asymmetric_padding.cairo
mod input_0; mod input_1; mod output_0; use orion::numbers::FixedTrait; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_2D_with_strides_asymmetric_padding() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::Some(array![3, 3].span()), Option::Some(array![1, 0, 1, 0].span()), Option::Some(array![2, 2].span()) ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_strides_asymmetric_padding/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(7); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 1507328, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1835008, sign: false }); data.append(FP16x16 { mag: 1900544, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 2097152, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 2228224, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_strides_asymmetric_padding/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_strides_asymmetric_padding/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(4); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 6488064, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 12386304, sign: false }); data.append(FP16x16 { mag: 13565952, sign: false }); data.append(FP16x16 { mag: 11206656, sign: false }); data.append(FP16x16 { mag: 11993088, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_strides_with_padding.cairo
mod input_0; mod input_1; mod output_0; use orion::numbers::FixedTrait; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_2D_with_strides_with_padding() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::Some(array![3, 3].span()), Option::Some(array![1, 1, 1, 1].span()), Option::Some(array![2, 2].span()) ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_strides_with_padding/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(7); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 1507328, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1835008, sign: false }); data.append(FP16x16 { mag: 1900544, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 2097152, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 2228224, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_strides_with_padding/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_2D_with_strides_with_padding/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(4); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 7077888, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); data.append(FP16x16 { mag: 12976128, sign: false }); data.append(FP16x16 { mag: 9240576, sign: false }); data.append(FP16x16 { mag: 7340032, sign: false }); data.append(FP16x16 { mag: 11599872, sign: false }); data.append(FP16x16 { mag: 8126464, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_3D_no_padding.cairo
mod input_0; mod input_1; mod output_0; use orion::numbers::FixedTrait; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_3D_no_padding() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_3D_no_padding/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(5); shape.append(5); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 1507328, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1835008, sign: false }); data.append(FP16x16 { mag: 1900544, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 2097152, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 2228224, sign: false }); data.append(FP16x16 { mag: 2293760, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 2490368, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 2621440, sign: false }); data.append(FP16x16 { mag: 2686976, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 2818048, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 2949120, sign: false }); data.append(FP16x16 { mag: 3014656, sign: false }); data.append(FP16x16 { mag: 3080192, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 3211264, sign: false }); data.append(FP16x16 { mag: 3276800, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 3604480, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 3735552, sign: false }); data.append(FP16x16 { mag: 3801088, sign: false }); data.append(FP16x16 { mag: 3866624, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 3997696, sign: false }); data.append(FP16x16 { mag: 4063232, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 4194304, sign: false }); data.append(FP16x16 { mag: 4259840, sign: false }); data.append(FP16x16 { mag: 4325376, sign: false }); data.append(FP16x16 { mag: 4390912, sign: false }); data.append(FP16x16 { mag: 4456448, sign: false }); data.append(FP16x16 { mag: 4521984, sign: false }); data.append(FP16x16 { mag: 4587520, sign: false }); data.append(FP16x16 { mag: 4653056, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 4784128, sign: false }); data.append(FP16x16 { mag: 4849664, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 4980736, sign: false }); data.append(FP16x16 { mag: 5046272, sign: false }); data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 5373952, sign: false }); data.append(FP16x16 { mag: 5439488, sign: false }); data.append(FP16x16 { mag: 5505024, sign: false }); data.append(FP16x16 { mag: 5570560, sign: false }); data.append(FP16x16 { mag: 5636096, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 5767168, sign: false }); data.append(FP16x16 { mag: 5832704, sign: false }); data.append(FP16x16 { mag: 5898240, sign: false }); data.append(FP16x16 { mag: 5963776, sign: false }); data.append(FP16x16 { mag: 6029312, sign: false }); data.append(FP16x16 { mag: 6094848, sign: false }); data.append(FP16x16 { mag: 6160384, sign: false }); data.append(FP16x16 { mag: 6225920, sign: false }); data.append(FP16x16 { mag: 6291456, sign: false }); data.append(FP16x16 { mag: 6356992, sign: false }); data.append(FP16x16 { mag: 6422528, sign: false }); data.append(FP16x16 { mag: 6488064, sign: false }); data.append(FP16x16 { mag: 6553600, sign: false }); data.append(FP16x16 { mag: 6619136, sign: false }); data.append(FP16x16 { mag: 6684672, sign: false }); data.append(FP16x16 { mag: 6750208, sign: false }); data.append(FP16x16 { mag: 6815744, sign: false }); data.append(FP16x16 { mag: 6881280, sign: false }); data.append(FP16x16 { mag: 6946816, sign: false }); data.append(FP16x16 { mag: 7012352, sign: false }); data.append(FP16x16 { mag: 7077888, sign: false }); data.append(FP16x16 { mag: 7143424, sign: false }); data.append(FP16x16 { mag: 7208960, sign: false }); data.append(FP16x16 { mag: 7274496, sign: false }); data.append(FP16x16 { mag: 7340032, sign: false }); data.append(FP16x16 { mag: 7405568, sign: false }); data.append(FP16x16 { mag: 7471104, sign: false }); data.append(FP16x16 { mag: 7536640, sign: false }); data.append(FP16x16 { mag: 7602176, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 7733248, sign: false }); data.append(FP16x16 { mag: 7798784, sign: false }); data.append(FP16x16 { mag: 7864320, sign: false }); data.append(FP16x16 { mag: 7929856, sign: false }); data.append(FP16x16 { mag: 7995392, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); data.append(FP16x16 { mag: 8126464, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_3D_no_padding/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_3D_no_padding/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 54853632, sign: false }); data.append(FP16x16 { mag: 56623104, sign: false }); data.append(FP16x16 { mag: 58392576, sign: false }); data.append(FP16x16 { mag: 63700992, sign: false }); data.append(FP16x16 { mag: 65470464, sign: false }); data.append(FP16x16 { mag: 67239936, sign: false }); data.append(FP16x16 { mag: 72548352, sign: false }); data.append(FP16x16 { mag: 74317824, sign: false }); data.append(FP16x16 { mag: 76087296, sign: false }); data.append(FP16x16 { mag: 99090432, sign: false }); data.append(FP16x16 { mag: 100859904, sign: false }); data.append(FP16x16 { mag: 102629376, sign: false }); data.append(FP16x16 { mag: 107937792, sign: false }); data.append(FP16x16 { mag: 109707264, sign: false }); data.append(FP16x16 { mag: 111476736, sign: false }); data.append(FP16x16 { mag: 116785152, sign: false }); data.append(FP16x16 { mag: 118554624, sign: false }); data.append(FP16x16 { mag: 120324096, sign: false }); data.append(FP16x16 { mag: 143327232, sign: false }); data.append(FP16x16 { mag: 145096704, sign: false }); data.append(FP16x16 { mag: 146866176, sign: false }); data.append(FP16x16 { mag: 152174592, sign: false }); data.append(FP16x16 { mag: 153944064, sign: false }); data.append(FP16x16 { mag: 155713536, sign: false }); data.append(FP16x16 { mag: 161021952, sign: false }); data.append(FP16x16 { mag: 162791424, sign: false }); data.append(FP16x16 { mag: 164560896, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_3D_with_padding.cairo
mod input_0; mod input_1; mod output_0; use orion::numbers::FixedTrait; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_3D_with_padding() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::None, Option::Some(array![1, 1, 1, 1, 1, 1].span()), Option::None ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_3D_with_padding/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(5); shape.append(5); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 1507328, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1835008, sign: false }); data.append(FP16x16 { mag: 1900544, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 2097152, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 2228224, sign: false }); data.append(FP16x16 { mag: 2293760, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 2490368, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 2621440, sign: false }); data.append(FP16x16 { mag: 2686976, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 2818048, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 2949120, sign: false }); data.append(FP16x16 { mag: 3014656, sign: false }); data.append(FP16x16 { mag: 3080192, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 3211264, sign: false }); data.append(FP16x16 { mag: 3276800, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 3604480, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 3735552, sign: false }); data.append(FP16x16 { mag: 3801088, sign: false }); data.append(FP16x16 { mag: 3866624, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 3997696, sign: false }); data.append(FP16x16 { mag: 4063232, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 4194304, sign: false }); data.append(FP16x16 { mag: 4259840, sign: false }); data.append(FP16x16 { mag: 4325376, sign: false }); data.append(FP16x16 { mag: 4390912, sign: false }); data.append(FP16x16 { mag: 4456448, sign: false }); data.append(FP16x16 { mag: 4521984, sign: false }); data.append(FP16x16 { mag: 4587520, sign: false }); data.append(FP16x16 { mag: 4653056, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 4784128, sign: false }); data.append(FP16x16 { mag: 4849664, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 4980736, sign: false }); data.append(FP16x16 { mag: 5046272, sign: false }); data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 5373952, sign: false }); data.append(FP16x16 { mag: 5439488, sign: false }); data.append(FP16x16 { mag: 5505024, sign: false }); data.append(FP16x16 { mag: 5570560, sign: false }); data.append(FP16x16 { mag: 5636096, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 5767168, sign: false }); data.append(FP16x16 { mag: 5832704, sign: false }); data.append(FP16x16 { mag: 5898240, sign: false }); data.append(FP16x16 { mag: 5963776, sign: false }); data.append(FP16x16 { mag: 6029312, sign: false }); data.append(FP16x16 { mag: 6094848, sign: false }); data.append(FP16x16 { mag: 6160384, sign: false }); data.append(FP16x16 { mag: 6225920, sign: false }); data.append(FP16x16 { mag: 6291456, sign: false }); data.append(FP16x16 { mag: 6356992, sign: false }); data.append(FP16x16 { mag: 6422528, sign: false }); data.append(FP16x16 { mag: 6488064, sign: false }); data.append(FP16x16 { mag: 6553600, sign: false }); data.append(FP16x16 { mag: 6619136, sign: false }); data.append(FP16x16 { mag: 6684672, sign: false }); data.append(FP16x16 { mag: 6750208, sign: false }); data.append(FP16x16 { mag: 6815744, sign: false }); data.append(FP16x16 { mag: 6881280, sign: false }); data.append(FP16x16 { mag: 6946816, sign: false }); data.append(FP16x16 { mag: 7012352, sign: false }); data.append(FP16x16 { mag: 7077888, sign: false }); data.append(FP16x16 { mag: 7143424, sign: false }); data.append(FP16x16 { mag: 7208960, sign: false }); data.append(FP16x16 { mag: 7274496, sign: false }); data.append(FP16x16 { mag: 7340032, sign: false }); data.append(FP16x16 { mag: 7405568, sign: false }); data.append(FP16x16 { mag: 7471104, sign: false }); data.append(FP16x16 { mag: 7536640, sign: false }); data.append(FP16x16 { mag: 7602176, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 7733248, sign: false }); data.append(FP16x16 { mag: 7798784, sign: false }); data.append(FP16x16 { mag: 7864320, sign: false }); data.append(FP16x16 { mag: 7929856, sign: false }); data.append(FP16x16 { mag: 7995392, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); data.append(FP16x16 { mag: 8126464, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_3D_with_padding/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_3D_with_padding/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(5); shape.append(5); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 8126464, sign: false }); data.append(FP16x16 { mag: 12582912, sign: false }); data.append(FP16x16 { mag: 13369344, sign: false }); data.append(FP16x16 { mag: 14155776, sign: false }); data.append(FP16x16 { mag: 9699328, sign: false }); data.append(FP16x16 { mag: 14155776, sign: false }); data.append(FP16x16 { mag: 21823488, sign: false }); data.append(FP16x16 { mag: 23003136, sign: false }); data.append(FP16x16 { mag: 24182784, sign: false }); data.append(FP16x16 { mag: 16515072, sign: false }); data.append(FP16x16 { mag: 18087936, sign: false }); data.append(FP16x16 { mag: 27721728, sign: false }); data.append(FP16x16 { mag: 28901376, sign: false }); data.append(FP16x16 { mag: 30081024, sign: false }); data.append(FP16x16 { mag: 20447232, sign: false }); data.append(FP16x16 { mag: 22020096, sign: false }); data.append(FP16x16 { mag: 33619968, sign: false }); data.append(FP16x16 { mag: 34799616, sign: false }); data.append(FP16x16 { mag: 35979264, sign: false }); data.append(FP16x16 { mag: 24379392, sign: false }); data.append(FP16x16 { mag: 15990784, sign: false }); data.append(FP16x16 { mag: 24379392, sign: false }); data.append(FP16x16 { mag: 25165824, sign: false }); data.append(FP16x16 { mag: 25952256, sign: false }); data.append(FP16x16 { mag: 17563648, sign: false }); data.append(FP16x16 { mag: 22020096, sign: false }); data.append(FP16x16 { mag: 33619968, sign: false }); data.append(FP16x16 { mag: 34799616, sign: false }); data.append(FP16x16 { mag: 35979264, sign: false }); data.append(FP16x16 { mag: 24379392, sign: false }); data.append(FP16x16 { mag: 35979264, sign: false }); data.append(FP16x16 { mag: 54853632, sign: false }); data.append(FP16x16 { mag: 56623104, sign: false }); data.append(FP16x16 { mag: 58392576, sign: false }); data.append(FP16x16 { mag: 39518208, sign: false }); data.append(FP16x16 { mag: 41877504, sign: false }); data.append(FP16x16 { mag: 63700992, sign: false }); data.append(FP16x16 { mag: 65470464, sign: false }); data.append(FP16x16 { mag: 67239936, sign: false }); data.append(FP16x16 { mag: 45416448, sign: false }); data.append(FP16x16 { mag: 47775744, sign: false }); data.append(FP16x16 { mag: 72548352, sign: false }); data.append(FP16x16 { mag: 74317824, sign: false }); data.append(FP16x16 { mag: 76087296, sign: false }); data.append(FP16x16 { mag: 51314688, sign: false }); data.append(FP16x16 { mag: 33816576, sign: false }); data.append(FP16x16 { mag: 51314688, sign: false }); data.append(FP16x16 { mag: 52494336, sign: false }); data.append(FP16x16 { mag: 53673984, sign: false }); data.append(FP16x16 { mag: 36175872, sign: false }); data.append(FP16x16 { mag: 41680896, sign: false }); data.append(FP16x16 { mag: 63111168, sign: false }); data.append(FP16x16 { mag: 64290816, sign: false }); data.append(FP16x16 { mag: 65470464, sign: false }); data.append(FP16x16 { mag: 44040192, sign: false }); data.append(FP16x16 { mag: 65470464, sign: false }); data.append(FP16x16 { mag: 99090432, sign: false }); data.append(FP16x16 { mag: 100859904, sign: false }); data.append(FP16x16 { mag: 102629376, sign: false }); data.append(FP16x16 { mag: 69009408, sign: false }); data.append(FP16x16 { mag: 71368704, sign: false }); data.append(FP16x16 { mag: 107937792, sign: false }); data.append(FP16x16 { mag: 109707264, sign: false }); data.append(FP16x16 { mag: 111476736, sign: false }); data.append(FP16x16 { mag: 74907648, sign: false }); data.append(FP16x16 { mag: 77266944, sign: false }); data.append(FP16x16 { mag: 116785152, sign: false }); data.append(FP16x16 { mag: 118554624, sign: false }); data.append(FP16x16 { mag: 120324096, sign: false }); data.append(FP16x16 { mag: 80805888, sign: false }); data.append(FP16x16 { mag: 53477376, sign: false }); data.append(FP16x16 { mag: 80805888, sign: false }); data.append(FP16x16 { mag: 81985536, sign: false }); data.append(FP16x16 { mag: 83165184, sign: false }); data.append(FP16x16 { mag: 55836672, sign: false }); data.append(FP16x16 { mag: 61341696, sign: false }); data.append(FP16x16 { mag: 92602368, sign: false }); data.append(FP16x16 { mag: 93782016, sign: false }); data.append(FP16x16 { mag: 94961664, sign: false }); data.append(FP16x16 { mag: 63700992, sign: false }); data.append(FP16x16 { mag: 94961664, sign: false }); data.append(FP16x16 { mag: 143327232, sign: false }); data.append(FP16x16 { mag: 145096704, sign: false }); data.append(FP16x16 { mag: 146866176, sign: false }); data.append(FP16x16 { mag: 98500608, sign: false }); data.append(FP16x16 { mag: 100859904, sign: false }); data.append(FP16x16 { mag: 152174592, sign: false }); data.append(FP16x16 { mag: 153944064, sign: false }); data.append(FP16x16 { mag: 155713536, sign: false }); data.append(FP16x16 { mag: 104398848, sign: false }); data.append(FP16x16 { mag: 106758144, sign: false }); data.append(FP16x16 { mag: 161021952, sign: false }); data.append(FP16x16 { mag: 162791424, sign: false }); data.append(FP16x16 { mag: 164560896, sign: false }); data.append(FP16x16 { mag: 110297088, sign: false }); data.append(FP16x16 { mag: 73138176, sign: false }); data.append(FP16x16 { mag: 110297088, sign: false }); data.append(FP16x16 { mag: 111476736, sign: false }); data.append(FP16x16 { mag: 112656384, sign: false }); data.append(FP16x16 { mag: 75497472, sign: false }); data.append(FP16x16 { mag: 47448064, sign: false }); data.append(FP16x16 { mag: 71565312, sign: false }); data.append(FP16x16 { mag: 72351744, sign: false }); data.append(FP16x16 { mag: 73138176, sign: false }); data.append(FP16x16 { mag: 49020928, sign: false }); data.append(FP16x16 { mag: 73138176, sign: false }); data.append(FP16x16 { mag: 110297088, sign: false }); data.append(FP16x16 { mag: 111476736, sign: false }); data.append(FP16x16 { mag: 112656384, sign: false }); data.append(FP16x16 { mag: 75497472, sign: false }); data.append(FP16x16 { mag: 77070336, sign: false }); data.append(FP16x16 { mag: 116195328, sign: false }); data.append(FP16x16 { mag: 117374976, sign: false }); data.append(FP16x16 { mag: 118554624, sign: false }); data.append(FP16x16 { mag: 79429632, sign: false }); data.append(FP16x16 { mag: 81002496, sign: false }); data.append(FP16x16 { mag: 122093568, sign: false }); data.append(FP16x16 { mag: 123273216, sign: false }); data.append(FP16x16 { mag: 124452864, sign: false }); data.append(FP16x16 { mag: 83361792, sign: false }); data.append(FP16x16 { mag: 55312384, sign: false }); data.append(FP16x16 { mag: 83361792, sign: false }); data.append(FP16x16 { mag: 84148224, sign: false }); data.append(FP16x16 { mag: 84934656, sign: false }); data.append(FP16x16 { mag: 56885248, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_4D_no_padding.cairo
mod input_0; mod input_1; mod output_0; use orion::numbers::FixedTrait; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_4D_no_padding() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_4D_no_padding/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 1507328, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1835008, sign: false }); data.append(FP16x16 { mag: 1900544, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 2097152, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 2228224, sign: false }); data.append(FP16x16 { mag: 2293760, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 2490368, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 2621440, sign: false }); data.append(FP16x16 { mag: 2686976, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 2818048, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 2949120, sign: false }); data.append(FP16x16 { mag: 3014656, sign: false }); data.append(FP16x16 { mag: 3080192, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 3211264, sign: false }); data.append(FP16x16 { mag: 3276800, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 3604480, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 3735552, sign: false }); data.append(FP16x16 { mag: 3801088, sign: false }); data.append(FP16x16 { mag: 3866624, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 3997696, sign: false }); data.append(FP16x16 { mag: 4063232, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 4194304, sign: false }); data.append(FP16x16 { mag: 4259840, sign: false }); data.append(FP16x16 { mag: 4325376, sign: false }); data.append(FP16x16 { mag: 4390912, sign: false }); data.append(FP16x16 { mag: 4456448, sign: false }); data.append(FP16x16 { mag: 4521984, sign: false }); data.append(FP16x16 { mag: 4587520, sign: false }); data.append(FP16x16 { mag: 4653056, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 4784128, sign: false }); data.append(FP16x16 { mag: 4849664, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 4980736, sign: false }); data.append(FP16x16 { mag: 5046272, sign: false }); data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_4D_no_padding/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(2); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_4D_no_padding/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(2); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 20971520, sign: false }); data.append(FP16x16 { mag: 22020096, sign: false }); data.append(FP16x16 { mag: 24117248, sign: false }); data.append(FP16x16 { mag: 25165824, sign: false }); data.append(FP16x16 { mag: 30408704, sign: false }); data.append(FP16x16 { mag: 31457280, sign: false }); data.append(FP16x16 { mag: 33554432, sign: false }); data.append(FP16x16 { mag: 34603008, sign: false }); data.append(FP16x16 { mag: 49283072, sign: false }); data.append(FP16x16 { mag: 50331648, sign: false }); data.append(FP16x16 { mag: 52428800, sign: false }); data.append(FP16x16 { mag: 53477376, sign: false }); data.append(FP16x16 { mag: 58720256, sign: false }); data.append(FP16x16 { mag: 59768832, sign: false }); data.append(FP16x16 { mag: 61865984, sign: false }); data.append(FP16x16 { mag: 62914560, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_4D_with_padding.cairo
mod input_0; mod input_1; mod output_0; use orion::numbers::FixedTrait; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_4D_with_padding() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::None, Option::Some(array![1, 1, 1, 1, 1, 1, 1, 1].span()), Option::None ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_4D_with_padding/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 1507328, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1835008, sign: false }); data.append(FP16x16 { mag: 1900544, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 2097152, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 2228224, sign: false }); data.append(FP16x16 { mag: 2293760, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 2490368, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 2621440, sign: false }); data.append(FP16x16 { mag: 2686976, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 2818048, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 2949120, sign: false }); data.append(FP16x16 { mag: 3014656, sign: false }); data.append(FP16x16 { mag: 3080192, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 3211264, sign: false }); data.append(FP16x16 { mag: 3276800, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 3604480, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 3735552, sign: false }); data.append(FP16x16 { mag: 3801088, sign: false }); data.append(FP16x16 { mag: 3866624, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 3997696, sign: false }); data.append(FP16x16 { mag: 4063232, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 4194304, sign: false }); data.append(FP16x16 { mag: 4259840, sign: false }); data.append(FP16x16 { mag: 4325376, sign: false }); data.append(FP16x16 { mag: 4390912, sign: false }); data.append(FP16x16 { mag: 4456448, sign: false }); data.append(FP16x16 { mag: 4521984, sign: false }); data.append(FP16x16 { mag: 4587520, sign: false }); data.append(FP16x16 { mag: 4653056, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 4784128, sign: false }); data.append(FP16x16 { mag: 4849664, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 4980736, sign: false }); data.append(FP16x16 { mag: 5046272, sign: false }); data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_4D_with_padding/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(2); shape.append(2); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_4D_with_padding/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(4); shape.append(4); shape.append(4); shape.append(4); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 2097152, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 4980736, sign: false }); data.append(FP16x16 { mag: 5505024, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 8126464, sign: false }); data.append(FP16x16 { mag: 8650752, sign: false }); data.append(FP16x16 { mag: 4456448, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 9699328, sign: false }); data.append(FP16x16 { mag: 10223616, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); data.append(FP16x16 { mag: 5505024, sign: false }); data.append(FP16x16 { mag: 2818048, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); data.append(FP16x16 { mag: 5505024, sign: false }); data.append(FP16x16 { mag: 2818048, sign: false }); data.append(FP16x16 { mag: 2949120, sign: false }); data.append(FP16x16 { mag: 6029312, sign: false }); data.append(FP16x16 { mag: 6291456, sign: false }); data.append(FP16x16 { mag: 3211264, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 3211264, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 8126464, sign: false }); data.append(FP16x16 { mag: 8650752, sign: false }); data.append(FP16x16 { mag: 4456448, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 9699328, sign: false }); data.append(FP16x16 { mag: 10223616, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); data.append(FP16x16 { mag: 5505024, sign: false }); data.append(FP16x16 { mag: 2818048, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 9699328, sign: false }); data.append(FP16x16 { mag: 10223616, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); data.append(FP16x16 { mag: 10223616, sign: false }); data.append(FP16x16 { mag: 20971520, sign: false }); data.append(FP16x16 { mag: 22020096, sign: false }); data.append(FP16x16 { mag: 11272192, sign: false }); data.append(FP16x16 { mag: 11796480, sign: false }); data.append(FP16x16 { mag: 24117248, sign: false }); data.append(FP16x16 { mag: 25165824, sign: false }); data.append(FP16x16 { mag: 12845056, sign: false }); data.append(FP16x16 { mag: 6291456, sign: false }); data.append(FP16x16 { mag: 12845056, sign: false }); data.append(FP16x16 { mag: 13369344, sign: false }); data.append(FP16x16 { mag: 6815744, sign: false }); data.append(FP16x16 { mag: 7077888, sign: false }); data.append(FP16x16 { mag: 14417920, sign: false }); data.append(FP16x16 { mag: 14942208, sign: false }); data.append(FP16x16 { mag: 7602176, sign: false }); data.append(FP16x16 { mag: 14942208, sign: false }); data.append(FP16x16 { mag: 30408704, sign: false }); data.append(FP16x16 { mag: 31457280, sign: false }); data.append(FP16x16 { mag: 15990784, sign: false }); data.append(FP16x16 { mag: 16515072, sign: false }); data.append(FP16x16 { mag: 33554432, sign: false }); data.append(FP16x16 { mag: 34603008, sign: false }); data.append(FP16x16 { mag: 17563648, sign: false }); data.append(FP16x16 { mag: 8650752, sign: false }); data.append(FP16x16 { mag: 17563648, sign: false }); data.append(FP16x16 { mag: 18087936, sign: false }); data.append(FP16x16 { mag: 9175040, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 8388608, sign: false }); data.append(FP16x16 { mag: 8650752, sign: false }); data.append(FP16x16 { mag: 4390912, sign: false }); data.append(FP16x16 { mag: 8650752, sign: false }); data.append(FP16x16 { mag: 17563648, sign: false }); data.append(FP16x16 { mag: 18087936, sign: false }); data.append(FP16x16 { mag: 9175040, sign: false }); data.append(FP16x16 { mag: 9437184, sign: false }); data.append(FP16x16 { mag: 19136512, sign: false }); data.append(FP16x16 { mag: 19660800, sign: false }); data.append(FP16x16 { mag: 9961472, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 9961472, sign: false }); data.append(FP16x16 { mag: 10223616, sign: false }); data.append(FP16x16 { mag: 5177344, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 10747904, sign: false }); data.append(FP16x16 { mag: 11010048, sign: false }); data.append(FP16x16 { mag: 5570560, sign: false }); data.append(FP16x16 { mag: 11010048, sign: false }); data.append(FP16x16 { mag: 22282240, sign: false }); data.append(FP16x16 { mag: 22806528, sign: false }); data.append(FP16x16 { mag: 11534336, sign: false }); data.append(FP16x16 { mag: 11796480, sign: false }); data.append(FP16x16 { mag: 23855104, sign: false }); data.append(FP16x16 { mag: 24379392, sign: false }); data.append(FP16x16 { mag: 12320768, sign: false }); data.append(FP16x16 { mag: 6094848, sign: false }); data.append(FP16x16 { mag: 12320768, sign: false }); data.append(FP16x16 { mag: 12582912, sign: false }); data.append(FP16x16 { mag: 6356992, sign: false }); data.append(FP16x16 { mag: 11796480, sign: false }); data.append(FP16x16 { mag: 23855104, sign: false }); data.append(FP16x16 { mag: 24379392, sign: false }); data.append(FP16x16 { mag: 12320768, sign: false }); data.append(FP16x16 { mag: 24379392, sign: false }); data.append(FP16x16 { mag: 49283072, sign: false }); data.append(FP16x16 { mag: 50331648, sign: false }); data.append(FP16x16 { mag: 25427968, sign: false }); data.append(FP16x16 { mag: 25952256, sign: false }); data.append(FP16x16 { mag: 52428800, sign: false }); data.append(FP16x16 { mag: 53477376, sign: false }); data.append(FP16x16 { mag: 27000832, sign: false }); data.append(FP16x16 { mag: 13369344, sign: false }); data.append(FP16x16 { mag: 27000832, sign: false }); data.append(FP16x16 { mag: 27525120, sign: false }); data.append(FP16x16 { mag: 13893632, sign: false }); data.append(FP16x16 { mag: 14155776, sign: false }); data.append(FP16x16 { mag: 28573696, sign: false }); data.append(FP16x16 { mag: 29097984, sign: false }); data.append(FP16x16 { mag: 14680064, sign: false }); data.append(FP16x16 { mag: 29097984, sign: false }); data.append(FP16x16 { mag: 58720256, sign: false }); data.append(FP16x16 { mag: 59768832, sign: false }); data.append(FP16x16 { mag: 30146560, sign: false }); data.append(FP16x16 { mag: 30670848, sign: false }); data.append(FP16x16 { mag: 61865984, sign: false }); data.append(FP16x16 { mag: 62914560, sign: false }); data.append(FP16x16 { mag: 31719424, sign: false }); data.append(FP16x16 { mag: 15728640, sign: false }); data.append(FP16x16 { mag: 31719424, sign: false }); data.append(FP16x16 { mag: 32243712, sign: false }); data.append(FP16x16 { mag: 16252928, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 15466496, sign: false }); data.append(FP16x16 { mag: 15728640, sign: false }); data.append(FP16x16 { mag: 7929856, sign: false }); data.append(FP16x16 { mag: 15728640, sign: false }); data.append(FP16x16 { mag: 31719424, sign: false }); data.append(FP16x16 { mag: 32243712, sign: false }); data.append(FP16x16 { mag: 16252928, sign: false }); data.append(FP16x16 { mag: 16515072, sign: false }); data.append(FP16x16 { mag: 33292288, sign: false }); data.append(FP16x16 { mag: 33816576, sign: false }); data.append(FP16x16 { mag: 17039360, sign: false }); data.append(FP16x16 { mag: 8454144, sign: false }); data.append(FP16x16 { mag: 17039360, sign: false }); data.append(FP16x16 { mag: 17301504, sign: false }); data.append(FP16x16 { mag: 8716288, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 7143424, sign: false }); data.append(FP16x16 { mag: 7274496, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 7274496, sign: false }); data.append(FP16x16 { mag: 14680064, sign: false }); data.append(FP16x16 { mag: 14942208, sign: false }); data.append(FP16x16 { mag: 7536640, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 15466496, sign: false }); data.append(FP16x16 { mag: 15728640, sign: false }); data.append(FP16x16 { mag: 7929856, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 7929856, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); data.append(FP16x16 { mag: 4063232, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 15466496, sign: false }); data.append(FP16x16 { mag: 15728640, sign: false }); data.append(FP16x16 { mag: 7929856, sign: false }); data.append(FP16x16 { mag: 15728640, sign: false }); data.append(FP16x16 { mag: 31719424, sign: false }); data.append(FP16x16 { mag: 32243712, sign: false }); data.append(FP16x16 { mag: 16252928, sign: false }); data.append(FP16x16 { mag: 16515072, sign: false }); data.append(FP16x16 { mag: 33292288, sign: false }); data.append(FP16x16 { mag: 33816576, sign: false }); data.append(FP16x16 { mag: 17039360, sign: false }); data.append(FP16x16 { mag: 8454144, sign: false }); data.append(FP16x16 { mag: 17039360, sign: false }); data.append(FP16x16 { mag: 17301504, sign: false }); data.append(FP16x16 { mag: 8716288, sign: false }); data.append(FP16x16 { mag: 8847360, sign: false }); data.append(FP16x16 { mag: 17825792, sign: false }); data.append(FP16x16 { mag: 18087936, sign: false }); data.append(FP16x16 { mag: 9109504, sign: false }); data.append(FP16x16 { mag: 18087936, sign: false }); data.append(FP16x16 { mag: 36438016, sign: false }); data.append(FP16x16 { mag: 36962304, sign: false }); data.append(FP16x16 { mag: 18612224, sign: false }); data.append(FP16x16 { mag: 18874368, sign: false }); data.append(FP16x16 { mag: 38010880, sign: false }); data.append(FP16x16 { mag: 38535168, sign: false }); data.append(FP16x16 { mag: 19398656, sign: false }); data.append(FP16x16 { mag: 9633792, sign: false }); data.append(FP16x16 { mag: 19398656, sign: false }); data.append(FP16x16 { mag: 19660800, sign: false }); data.append(FP16x16 { mag: 9895936, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 9502720, sign: false }); data.append(FP16x16 { mag: 9633792, sign: false }); data.append(FP16x16 { mag: 4849664, sign: false }); data.append(FP16x16 { mag: 9633792, sign: false }); data.append(FP16x16 { mag: 19398656, sign: false }); data.append(FP16x16 { mag: 19660800, sign: false }); data.append(FP16x16 { mag: 9895936, sign: false }); data.append(FP16x16 { mag: 10027008, sign: false }); data.append(FP16x16 { mag: 20185088, sign: false }); data.append(FP16x16 { mag: 20447232, sign: false }); data.append(FP16x16 { mag: 10289152, sign: false }); data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 10289152, sign: false }); data.append(FP16x16 { mag: 10420224, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::numbers::FixedTrait; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_transpose() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv_transpose( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(5); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_1d.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::numbers::FixedTrait; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_transpose_1d() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv_transpose( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_1d/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_1d/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_1d/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_3d.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::numbers::FixedTrait; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_transpose_3d() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv_transpose( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_3d/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(4); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 1507328, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1835008, sign: false }); data.append(FP16x16 { mag: 1900544, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 2097152, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 2228224, sign: false }); data.append(FP16x16 { mag: 2293760, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 2490368, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 2621440, sign: false }); data.append(FP16x16 { mag: 2686976, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 2818048, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 2949120, sign: false }); data.append(FP16x16 { mag: 3014656, sign: false }); data.append(FP16x16 { mag: 3080192, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 3211264, sign: false }); data.append(FP16x16 { mag: 3276800, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 3473408, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 3604480, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 3735552, sign: false }); data.append(FP16x16 { mag: 3801088, sign: false }); data.append(FP16x16 { mag: 3866624, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_3d/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(3); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_3d/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(5); shape.append(6); shape.append(7); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 6488064, sign: false }); data.append(FP16x16 { mag: 7077888, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 6094848, sign: false }); data.append(FP16x16 { mag: 4194304, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 4325376, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 1835008, sign: false }); data.append(FP16x16 { mag: 3276800, sign: false }); data.append(FP16x16 { mag: 6815744, sign: false }); data.append(FP16x16 { mag: 10616832, sign: false }); data.append(FP16x16 { mag: 11403264, sign: false }); data.append(FP16x16 { mag: 12189696, sign: false }); data.append(FP16x16 { mag: 8388608, sign: false }); data.append(FP16x16 { mag: 4325376, sign: false }); data.append(FP16x16 { mag: 5898240, sign: false }); data.append(FP16x16 { mag: 12189696, sign: false }); data.append(FP16x16 { mag: 18874368, sign: false }); data.append(FP16x16 { mag: 20054016, sign: false }); data.append(FP16x16 { mag: 21233664, sign: false }); data.append(FP16x16 { mag: 14548992, sign: false }); data.append(FP16x16 { mag: 7471104, sign: false }); data.append(FP16x16 { mag: 7864320, sign: false }); data.append(FP16x16 { mag: 16121856, sign: false }); data.append(FP16x16 { mag: 24772608, sign: false }); data.append(FP16x16 { mag: 25952256, sign: false }); data.append(FP16x16 { mag: 27131904, sign: false }); data.append(FP16x16 { mag: 18481152, sign: false }); data.append(FP16x16 { mag: 9437184, sign: false }); data.append(FP16x16 { mag: 5898240, sign: false }); data.append(FP16x16 { mag: 12058624, sign: false }); data.append(FP16x16 { mag: 18481152, sign: false }); data.append(FP16x16 { mag: 19267584, sign: false }); data.append(FP16x16 { mag: 20054016, sign: false }); data.append(FP16x16 { mag: 13631488, sign: false }); data.append(FP16x16 { mag: 6946816, sign: false }); data.append(FP16x16 { mag: 3276800, sign: false }); data.append(FP16x16 { mag: 6684672, sign: false }); data.append(FP16x16 { mag: 10223616, sign: false }); data.append(FP16x16 { mag: 10616832, sign: false }); data.append(FP16x16 { mag: 11010048, sign: false }); data.append(FP16x16 { mag: 7471104, sign: false }); data.append(FP16x16 { mag: 3801088, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); data.append(FP16x16 { mag: 12386304, sign: false }); data.append(FP16x16 { mag: 12976128, sign: false }); data.append(FP16x16 { mag: 13565952, sign: false }); data.append(FP16x16 { mag: 9240576, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 8847360, sign: false }); data.append(FP16x16 { mag: 18087936, sign: false }); data.append(FP16x16 { mag: 27721728, sign: false }); data.append(FP16x16 { mag: 28901376, sign: false }); data.append(FP16x16 { mag: 30081024, sign: false }); data.append(FP16x16 { mag: 20447232, sign: false }); data.append(FP16x16 { mag: 10420224, sign: false }); data.append(FP16x16 { mag: 14745600, sign: false }); data.append(FP16x16 { mag: 30081024, sign: false }); data.append(FP16x16 { mag: 46006272, sign: false }); data.append(FP16x16 { mag: 47775744, sign: false }); data.append(FP16x16 { mag: 49545216, sign: false }); data.append(FP16x16 { mag: 33619968, sign: false }); data.append(FP16x16 { mag: 17104896, sign: false }); data.append(FP16x16 { mag: 17694720, sign: false }); data.append(FP16x16 { mag: 35979264, sign: false }); data.append(FP16x16 { mag: 54853632, sign: false }); data.append(FP16x16 { mag: 56623104, sign: false }); data.append(FP16x16 { mag: 58392576, sign: false }); data.append(FP16x16 { mag: 39518208, sign: false }); data.append(FP16x16 { mag: 20054016, sign: false }); data.append(FP16x16 { mag: 12779520, sign: false }); data.append(FP16x16 { mag: 25952256, sign: false }); data.append(FP16x16 { mag: 39518208, sign: false }); data.append(FP16x16 { mag: 40697856, sign: false }); data.append(FP16x16 { mag: 41877504, sign: false }); data.append(FP16x16 { mag: 28311552, sign: false }); data.append(FP16x16 { mag: 14352384, sign: false }); data.append(FP16x16 { mag: 6881280, sign: false }); data.append(FP16x16 { mag: 13959168, sign: false }); data.append(FP16x16 { mag: 21233664, sign: false }); data.append(FP16x16 { mag: 21823488, sign: false }); data.append(FP16x16 { mag: 22413312, sign: false }); data.append(FP16x16 { mag: 15138816, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 7995392, sign: false }); data.append(FP16x16 { mag: 12189696, sign: false }); data.append(FP16x16 { mag: 12582912, sign: false }); data.append(FP16x16 { mag: 12976128, sign: false }); data.append(FP16x16 { mag: 8781824, sign: false }); data.append(FP16x16 { mag: 4456448, sign: false }); data.append(FP16x16 { mag: 8519680, sign: false }); data.append(FP16x16 { mag: 17301504, sign: false }); data.append(FP16x16 { mag: 26345472, sign: false }); data.append(FP16x16 { mag: 27131904, sign: false }); data.append(FP16x16 { mag: 27918336, sign: false }); data.append(FP16x16 { mag: 18874368, sign: false }); data.append(FP16x16 { mag: 9568256, sign: false }); data.append(FP16x16 { mag: 13762560, sign: false }); data.append(FP16x16 { mag: 27918336, sign: false }); data.append(FP16x16 { mag: 42467328, sign: false }); data.append(FP16x16 { mag: 43646976, sign: false }); data.append(FP16x16 { mag: 44826624, sign: false }); data.append(FP16x16 { mag: 30277632, sign: false }); data.append(FP16x16 { mag: 15335424, sign: false }); data.append(FP16x16 { mag: 15728640, sign: false }); data.append(FP16x16 { mag: 31850496, sign: false }); data.append(FP16x16 { mag: 48365568, sign: false }); data.append(FP16x16 { mag: 49545216, sign: false }); data.append(FP16x16 { mag: 50724864, sign: false }); data.append(FP16x16 { mag: 34209792, sign: false }); data.append(FP16x16 { mag: 17301504, sign: false }); data.append(FP16x16 { mag: 11141120, sign: false }); data.append(FP16x16 { mag: 22544384, sign: false }); data.append(FP16x16 { mag: 34209792, sign: false }); data.append(FP16x16 { mag: 34996224, sign: false }); data.append(FP16x16 { mag: 35782656, sign: false }); data.append(FP16x16 { mag: 24117248, sign: false }); data.append(FP16x16 { mag: 12189696, sign: false }); data.append(FP16x16 { mag: 5898240, sign: false }); data.append(FP16x16 { mag: 11927552, sign: false }); data.append(FP16x16 { mag: 18087936, sign: false }); data.append(FP16x16 { mag: 18481152, sign: false }); data.append(FP16x16 { mag: 18874368, sign: false }); data.append(FP16x16 { mag: 12713984, sign: false }); data.append(FP16x16 { mag: 6422528, sign: false }); data.append(FP16x16 { mag: 2621440, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); data.append(FP16x16 { mag: 8257536, sign: false }); data.append(FP16x16 { mag: 8454144, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 5570560, sign: false }); data.append(FP16x16 { mag: 11272192, sign: false }); data.append(FP16x16 { mag: 17104896, sign: false }); data.append(FP16x16 { mag: 17498112, sign: false }); data.append(FP16x16 { mag: 17891328, sign: false }); data.append(FP16x16 { mag: 12058624, sign: false }); data.append(FP16x16 { mag: 6094848, sign: false }); data.append(FP16x16 { mag: 8847360, sign: false }); data.append(FP16x16 { mag: 17891328, sign: false }); data.append(FP16x16 { mag: 27131904, sign: false }); data.append(FP16x16 { mag: 27721728, sign: false }); data.append(FP16x16 { mag: 28311552, sign: false }); data.append(FP16x16 { mag: 19070976, sign: false }); data.append(FP16x16 { mag: 9633792, sign: false }); data.append(FP16x16 { mag: 9830400, sign: false }); data.append(FP16x16 { mag: 19857408, sign: false }); data.append(FP16x16 { mag: 30081024, sign: false }); data.append(FP16x16 { mag: 30670848, sign: false }); data.append(FP16x16 { mag: 31260672, sign: false }); data.append(FP16x16 { mag: 21037056, sign: false }); data.append(FP16x16 { mag: 10616832, sign: false }); data.append(FP16x16 { mag: 6881280, sign: false }); data.append(FP16x16 { mag: 13893632, sign: false }); data.append(FP16x16 { mag: 21037056, sign: false }); data.append(FP16x16 { mag: 21430272, sign: false }); data.append(FP16x16 { mag: 21823488, sign: false }); data.append(FP16x16 { mag: 14680064, sign: false }); data.append(FP16x16 { mag: 7405568, sign: false }); data.append(FP16x16 { mag: 3604480, sign: false }); data.append(FP16x16 { mag: 7274496, sign: false }); data.append(FP16x16 { mag: 11010048, sign: false }); data.append(FP16x16 { mag: 11206656, sign: false }); data.append(FP16x16 { mag: 11403264, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 3866624, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 6488064, sign: false }); data.append(FP16x16 { mag: 7077888, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 3407872, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 6094848, sign: false }); data.append(FP16x16 { mag: 4194304, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 4325376, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 5111808, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); data.append(FP16x16 { mag: 1835008, sign: false }); data.append(FP16x16 { mag: 3276800, sign: false }); data.append(FP16x16 { mag: 6815744, sign: false }); data.append(FP16x16 { mag: 10616832, sign: false }); data.append(FP16x16 { mag: 11403264, sign: false }); data.append(FP16x16 { mag: 12189696, sign: false }); data.append(FP16x16 { mag: 8388608, sign: false }); data.append(FP16x16 { mag: 4325376, sign: false }); data.append(FP16x16 { mag: 5898240, sign: false }); data.append(FP16x16 { mag: 12189696, sign: false }); data.append(FP16x16 { mag: 18874368, sign: false }); data.append(FP16x16 { mag: 20054016, sign: false }); data.append(FP16x16 { mag: 21233664, sign: false }); data.append(FP16x16 { mag: 14548992, sign: false }); data.append(FP16x16 { mag: 7471104, sign: false }); data.append(FP16x16 { mag: 7864320, sign: false }); data.append(FP16x16 { mag: 16121856, sign: false }); data.append(FP16x16 { mag: 24772608, sign: false }); data.append(FP16x16 { mag: 25952256, sign: false }); data.append(FP16x16 { mag: 27131904, sign: false }); data.append(FP16x16 { mag: 18481152, sign: false }); data.append(FP16x16 { mag: 9437184, sign: false }); data.append(FP16x16 { mag: 5898240, sign: false }); data.append(FP16x16 { mag: 12058624, sign: false }); data.append(FP16x16 { mag: 18481152, sign: false }); data.append(FP16x16 { mag: 19267584, sign: false }); data.append(FP16x16 { mag: 20054016, sign: false }); data.append(FP16x16 { mag: 13631488, sign: false }); data.append(FP16x16 { mag: 6946816, sign: false }); data.append(FP16x16 { mag: 3276800, sign: false }); data.append(FP16x16 { mag: 6684672, sign: false }); data.append(FP16x16 { mag: 10223616, sign: false }); data.append(FP16x16 { mag: 10616832, sign: false }); data.append(FP16x16 { mag: 11010048, sign: false }); data.append(FP16x16 { mag: 7471104, sign: false }); data.append(FP16x16 { mag: 3801088, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); data.append(FP16x16 { mag: 12386304, sign: false }); data.append(FP16x16 { mag: 12976128, sign: false }); data.append(FP16x16 { mag: 13565952, sign: false }); data.append(FP16x16 { mag: 9240576, sign: false }); data.append(FP16x16 { mag: 4718592, sign: false }); data.append(FP16x16 { mag: 8847360, sign: false }); data.append(FP16x16 { mag: 18087936, sign: false }); data.append(FP16x16 { mag: 27721728, sign: false }); data.append(FP16x16 { mag: 28901376, sign: false }); data.append(FP16x16 { mag: 30081024, sign: false }); data.append(FP16x16 { mag: 20447232, sign: false }); data.append(FP16x16 { mag: 10420224, sign: false }); data.append(FP16x16 { mag: 14745600, sign: false }); data.append(FP16x16 { mag: 30081024, sign: false }); data.append(FP16x16 { mag: 46006272, sign: false }); data.append(FP16x16 { mag: 47775744, sign: false }); data.append(FP16x16 { mag: 49545216, sign: false }); data.append(FP16x16 { mag: 33619968, sign: false }); data.append(FP16x16 { mag: 17104896, sign: false }); data.append(FP16x16 { mag: 17694720, sign: false }); data.append(FP16x16 { mag: 35979264, sign: false }); data.append(FP16x16 { mag: 54853632, sign: false }); data.append(FP16x16 { mag: 56623104, sign: false }); data.append(FP16x16 { mag: 58392576, sign: false }); data.append(FP16x16 { mag: 39518208, sign: false }); data.append(FP16x16 { mag: 20054016, sign: false }); data.append(FP16x16 { mag: 12779520, sign: false }); data.append(FP16x16 { mag: 25952256, sign: false }); data.append(FP16x16 { mag: 39518208, sign: false }); data.append(FP16x16 { mag: 40697856, sign: false }); data.append(FP16x16 { mag: 41877504, sign: false }); data.append(FP16x16 { mag: 28311552, sign: false }); data.append(FP16x16 { mag: 14352384, sign: false }); data.append(FP16x16 { mag: 6881280, sign: false }); data.append(FP16x16 { mag: 13959168, sign: false }); data.append(FP16x16 { mag: 21233664, sign: false }); data.append(FP16x16 { mag: 21823488, sign: false }); data.append(FP16x16 { mag: 22413312, sign: false }); data.append(FP16x16 { mag: 15138816, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 7995392, sign: false }); data.append(FP16x16 { mag: 12189696, sign: false }); data.append(FP16x16 { mag: 12582912, sign: false }); data.append(FP16x16 { mag: 12976128, sign: false }); data.append(FP16x16 { mag: 8781824, sign: false }); data.append(FP16x16 { mag: 4456448, sign: false }); data.append(FP16x16 { mag: 8519680, sign: false }); data.append(FP16x16 { mag: 17301504, sign: false }); data.append(FP16x16 { mag: 26345472, sign: false }); data.append(FP16x16 { mag: 27131904, sign: false }); data.append(FP16x16 { mag: 27918336, sign: false }); data.append(FP16x16 { mag: 18874368, sign: false }); data.append(FP16x16 { mag: 9568256, sign: false }); data.append(FP16x16 { mag: 13762560, sign: false }); data.append(FP16x16 { mag: 27918336, sign: false }); data.append(FP16x16 { mag: 42467328, sign: false }); data.append(FP16x16 { mag: 43646976, sign: false }); data.append(FP16x16 { mag: 44826624, sign: false }); data.append(FP16x16 { mag: 30277632, sign: false }); data.append(FP16x16 { mag: 15335424, sign: false }); data.append(FP16x16 { mag: 15728640, sign: false }); data.append(FP16x16 { mag: 31850496, sign: false }); data.append(FP16x16 { mag: 48365568, sign: false }); data.append(FP16x16 { mag: 49545216, sign: false }); data.append(FP16x16 { mag: 50724864, sign: false }); data.append(FP16x16 { mag: 34209792, sign: false }); data.append(FP16x16 { mag: 17301504, sign: false }); data.append(FP16x16 { mag: 11141120, sign: false }); data.append(FP16x16 { mag: 22544384, sign: false }); data.append(FP16x16 { mag: 34209792, sign: false }); data.append(FP16x16 { mag: 34996224, sign: false }); data.append(FP16x16 { mag: 35782656, sign: false }); data.append(FP16x16 { mag: 24117248, sign: false }); data.append(FP16x16 { mag: 12189696, sign: false }); data.append(FP16x16 { mag: 5898240, sign: false }); data.append(FP16x16 { mag: 11927552, sign: false }); data.append(FP16x16 { mag: 18087936, sign: false }); data.append(FP16x16 { mag: 18481152, sign: false }); data.append(FP16x16 { mag: 18874368, sign: false }); data.append(FP16x16 { mag: 12713984, sign: false }); data.append(FP16x16 { mag: 6422528, sign: false }); data.append(FP16x16 { mag: 2621440, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); data.append(FP16x16 { mag: 8257536, sign: false }); data.append(FP16x16 { mag: 8454144, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 5570560, sign: false }); data.append(FP16x16 { mag: 11272192, sign: false }); data.append(FP16x16 { mag: 17104896, sign: false }); data.append(FP16x16 { mag: 17498112, sign: false }); data.append(FP16x16 { mag: 17891328, sign: false }); data.append(FP16x16 { mag: 12058624, sign: false }); data.append(FP16x16 { mag: 6094848, sign: false }); data.append(FP16x16 { mag: 8847360, sign: false }); data.append(FP16x16 { mag: 17891328, sign: false }); data.append(FP16x16 { mag: 27131904, sign: false }); data.append(FP16x16 { mag: 27721728, sign: false }); data.append(FP16x16 { mag: 28311552, sign: false }); data.append(FP16x16 { mag: 19070976, sign: false }); data.append(FP16x16 { mag: 9633792, sign: false }); data.append(FP16x16 { mag: 9830400, sign: false }); data.append(FP16x16 { mag: 19857408, sign: false }); data.append(FP16x16 { mag: 30081024, sign: false }); data.append(FP16x16 { mag: 30670848, sign: false }); data.append(FP16x16 { mag: 31260672, sign: false }); data.append(FP16x16 { mag: 21037056, sign: false }); data.append(FP16x16 { mag: 10616832, sign: false }); data.append(FP16x16 { mag: 6881280, sign: false }); data.append(FP16x16 { mag: 13893632, sign: false }); data.append(FP16x16 { mag: 21037056, sign: false }); data.append(FP16x16 { mag: 21430272, sign: false }); data.append(FP16x16 { mag: 21823488, sign: false }); data.append(FP16x16 { mag: 14680064, sign: false }); data.append(FP16x16 { mag: 7405568, sign: false }); data.append(FP16x16 { mag: 3604480, sign: false }); data.append(FP16x16 { mag: 7274496, sign: false }); data.append(FP16x16 { mag: 11010048, sign: false }); data.append(FP16x16 { mag: 11206656, sign: false }); data.append(FP16x16 { mag: 11403264, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 3866624, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_attributes.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::numbers::FixedTrait; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_transpose_attributes() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv_transpose( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::None ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_attributes/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_attributes/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_attributes/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(5); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_autopad_same.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::numbers::FixedTrait; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; use orion::operators::nn::functional::conv_transpose::AUTO_PAD; #[test] #[available_gas(2000000000)] fn test_conv_transpose_autopad_same() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv_transpose( @input_0, @input_1, Option::None, Option::Some(AUTO_PAD::SAME_UPPER), Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, Option::Some(array![2, 2].span()) ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_autopad_same/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_autopad_same/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_autopad_same/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(6); shape.append(6); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_dilations.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::numbers::FixedTrait; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_transpose_dilations() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv_transpose( @input_0, @input_1, Option::None, Option::None, Option::Some(array![2, 2].span()), Option::None, Option::None, Option::None, Option::None, Option::None, Option::None, ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_dilations/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_dilations/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_dilations/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(5); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 2293760, sign: false }); data.append(FP16x16 { mag: 4390912, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 4980736, sign: false }); data.append(FP16x16 { mag: 4980736, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 5767168, sign: false }); data.append(FP16x16 { mag: 2949120, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 3538944, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_group_2.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::numbers::FixedTrait; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_transpose_group_2() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv_transpose( @input_0, @input_1, Option::None, Option::None, Option::None, Option::Some(2), Option::None, Option::None, Option::None, Option::None, Option::None, ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_group_2/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_group_2/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_group_2/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(5); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 4521984, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_group_2_image_3.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::numbers::FixedTrait; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_transpose_group_2_image_3() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv_transpose( @input_0, @input_1, Option::None, Option::None, Option::None, Option::Some(2), Option::None, Option::None, Option::None, Option::None, Option::None, ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_group_2_image_3/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(2); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 1441792, sign: false }); data.append(FP16x16 { mag: 1507328, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 1048576, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_group_2_image_3/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_group_2_image_3/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(3); shape.append(2); shape.append(5); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 4521984, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 1179648, sign: false }); data.append(FP16x16 { mag: 2424832, sign: false }); data.append(FP16x16 { mag: 3735552, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2555904, sign: false }); data.append(FP16x16 { mag: 5242880, sign: false }); data.append(FP16x16 { mag: 8060928, sign: false }); data.append(FP16x16 { mag: 5505024, sign: false }); data.append(FP16x16 { mag: 2818048, sign: false }); data.append(FP16x16 { mag: 4128768, sign: false }); data.append(FP16x16 { mag: 8454144, sign: false }); data.append(FP16x16 { mag: 12976128, sign: false }); data.append(FP16x16 { mag: 8847360, sign: false }); data.append(FP16x16 { mag: 4521984, sign: false }); data.append(FP16x16 { mag: 2949120, sign: false }); data.append(FP16x16 { mag: 6029312, sign: false }); data.append(FP16x16 { mag: 9240576, sign: false }); data.append(FP16x16 { mag: 6291456, sign: false }); data.append(FP16x16 { mag: 3211264, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 3211264, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 3342336, sign: false }); data.append(FP16x16 { mag: 1703936, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 4521984, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1310720, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1572864, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 1245184, sign: false }); data.append(FP16x16 { mag: 1966080, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 720896, sign: false }); data.append(FP16x16 { mag: 1376256, sign: false }); data.append(FP16x16 { mag: 2883584, sign: false }); data.append(FP16x16 { mag: 4521984, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 1638400, sign: false }); data.append(FP16x16 { mag: 2359296, sign: false }); data.append(FP16x16 { mag: 4915200, sign: false }); data.append(FP16x16 { mag: 7667712, sign: false }); data.append(FP16x16 { mag: 5308416, sign: false }); data.append(FP16x16 { mag: 2752512, sign: false }); data.append(FP16x16 { mag: 1769472, sign: false }); data.append(FP16x16 { mag: 3670016, sign: false }); data.append(FP16x16 { mag: 5701632, sign: false }); data.append(FP16x16 { mag: 3932160, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 2031616, sign: false }); data.append(FP16x16 { mag: 3145728, sign: false }); data.append(FP16x16 { mag: 2162688, sign: false }); data.append(FP16x16 { mag: 1114112, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_pads.cairo
mod input_0; mod input_1; mod output_0; use orion::operators::nn::NNTrait; use orion::utils::{assert_eq, assert_seq_eq}; use orion::numbers::FixedTrait; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::nn::FP16x16NN; #[test] #[available_gas(2000000000)] fn test_conv_transpose_pads() { let input_0 = input_0::input_0(); let input_1 = input_1::input_1(); let z_0 = output_0::output_0(); let y_0 = NNTrait::conv_transpose( @input_0, @input_1, Option::None, Option::None, Option::None, Option::None, Option::Some(array![3, 3].span()), Option::Some(array![1, 1].span()), Option::Some(array![10, 8].span()), Option::None, Option::Some(array![3, 2].span()) ); assert_eq(y_0, z_0); }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_pads/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(1); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_pads/input_1.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_1() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(3); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/conv_transpose_pads/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(1); shape.append(2); shape.append(10); shape.append(8); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 851968, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 524288, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cos_fp16x16.cairo
mod input_0; mod output_0; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; #[test] #[available_gas(2000000000)] fn test_cos_fp16x16() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cos(); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cos_fp16x16/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 1913830, sign: false }); data.append(FP16x16 { mag: 4049104, sign: false }); data.append(FP16x16 { mag: 2278925, sign: false }); data.append(FP16x16 { mag: 6595486, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cos_fp16x16/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 39263, sign: true }); data.append(FP16x16 { mag: 32755, sign: false }); data.append(FP16x16 { mag: 64011, sign: true }); data.append(FP16x16 { mag: 65152, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cos_fp8x23.cairo
mod input_0; mod output_0; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(2000000000)] fn test_cos_fp8x23() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cos(); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cos_fp8x23/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; use orion::numbers::{FixedTrait, FP8x23}; fn input_0() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 867902390, sign: false }); data.append(FP8x23 { mag: 179014618, sign: false }); data.append(FP8x23 { mag: 1037532703, sign: false }); data.append(FP8x23 { mag: 37869648, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cos_fp8x23/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; use orion::numbers::{FixedTrait, FP8x23}; fn output_0() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 8203389, sign: true }); data.append(FP8x23 { mag: 6673244, sign: true }); data.append(FP8x23 { mag: 3338956, sign: true }); data.append(FP8x23 { mag: 1649907, sign: true }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cosh_fp16x16.cairo
mod input_0; mod output_0; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; #[test] #[available_gas(2000000000)] fn test_cosh_fp16x16() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cosh(); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cosh_fp16x16/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 111792, sign: false }); data.append(FP16x16 { mag: 177968, sign: true }); data.append(FP16x16 { mag: 144397, sign: false }); data.append(FP16x16 { mag: 151621, sign: true }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cosh_fp16x16/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorSub}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 186369, sign: false }); data.append(FP16x16 { mag: 497406, sign: false }); data.append(FP16x16 { mag: 300338, sign: false }); data.append(FP16x16 { mag: 334535, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cosh_fp8x23.cairo
mod input_0; mod output_0; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; use orion::utils::{assert_eq, assert_seq_eq}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::FP8x23TensorPartialEq; use core::array::{ArrayTrait, SpanTrait}; #[test] #[available_gas(2000000000)] fn test_cosh_fp8x23() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cosh(); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cosh_fp8x23/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; use orion::numbers::{FixedTrait, FP8x23}; fn input_0() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 6347776, sign: false }); data.append(FP8x23 { mag: 12366572, sign: false }); data.append(FP8x23 { mag: 8513073, sign: true }); data.append(FP8x23 { mag: 20925683, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cosh_fp8x23/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorSub}; use orion::numbers::{FixedTrait, FP8x23}; fn output_0() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(2); let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 10907148, sign: false }); data.append(FP8x23 { mag: 19279307, sign: false }); data.append(FP8x23 { mag: 13092000, sign: false }); data.append(FP8x23 { mag: 51164820, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_default.cairo
mod input_0; mod output_0; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(2000000000)] fn test_cumsum_fp16x16_1d_default() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cumsum(0, Option::None(()), Option::None(())); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_default/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_default/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_exclusive.cairo
mod input_0; mod output_0; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(2000000000)] fn test_cumsum_fp16x16_1d_exclusive() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_exclusive/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_exclusive/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 0, sign: false }); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 655360, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_reverse.cairo
mod input_0; mod output_0; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(2000000000)] fn test_cumsum_fp16x16_1d_reverse() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cumsum(0, Option::Some(false), Option::Some(true)); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_reverse/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_reverse/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 983040, sign: false }); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_reverse_exclusive.cairo
mod input_0; mod output_0; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(2000000000)] fn test_cumsum_fp16x16_1d_reverse_exclusive() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cumsum(0, Option::Some(true), Option::Some(true)); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_1d_reverse_exclusive/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 917504, sign: false }); data.append(FP16x16 { mag: 786432, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 0, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_2d_axis_0.cairo
mod input_0; mod output_0; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(2000000000)] fn test_cumsum_fp16x16_2d_axis_0() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cumsum(0, Option::None(()), Option::None(())); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_2d_axis_0/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_2d_axis_0/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 458752, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_2d_axis_1.cairo
mod input_0; mod output_0; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP16x16TensorPartialEq; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(2000000000)] fn test_cumsum_fp16x16_2d_axis_1() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cumsum(1, Option::None(()), Option::None(())); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_2d_axis_1/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn input_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 131072, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 327680, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp16x16_2d_axis_1/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP16x16Tensor, FP16x16TensorAdd}; use orion::numbers::{FixedTrait, FP16x16}; fn output_0() -> Tensor<FP16x16> { let mut shape = ArrayTrait::<usize>::new(); shape.append(2); shape.append(3); let mut data = ArrayTrait::new(); data.append(FP16x16 { mag: 65536, sign: false }); data.append(FP16x16 { mag: 196608, sign: false }); data.append(FP16x16 { mag: 393216, sign: false }); data.append(FP16x16 { mag: 262144, sign: false }); data.append(FP16x16 { mag: 589824, sign: false }); data.append(FP16x16 { mag: 983040, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp8x23_1d_default.cairo
mod input_0; mod output_0; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(2000000000)] fn test_cumsum_fp8x23_1d_default() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cumsum(0, Option::None(()), Option::None(())); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp8x23_1d_default/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; use orion::numbers::{FixedTrait, FP8x23}; fn input_0() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp8x23_1d_default/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; use orion::numbers::{FixedTrait, FP8x23}; fn output_0() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 83886080, sign: false }); data.append(FP8x23 { mag: 125829120, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp8x23_1d_exclusive.cairo
mod input_0; mod output_0; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; use orion::operators::tensor::{TensorTrait, Tensor}; use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::FP8x23TensorPartialEq; use orion::utils::{assert_eq, assert_seq_eq}; #[test] #[available_gas(2000000000)] fn test_cumsum_fp8x23_1d_exclusive() { let input_0 = input_0::input_0(); let z = output_0::output_0(); let y = input_0.cumsum(0, Option::Some(true), Option::Some(false)); assert_eq(y, z); }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp8x23_1d_exclusive/input_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; use orion::numbers::{FixedTrait, FP8x23}; fn input_0() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 16777216, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 33554432, sign: false }); data.append(FP8x23 { mag: 41943040, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion
tests/nodes/cumsum_fp8x23_1d_exclusive/output_0.cairo
use core::array::{ArrayTrait, SpanTrait}; use orion::operators::tensor::{TensorTrait, Tensor}; use orion::operators::tensor::{FP8x23Tensor, FP8x23TensorAdd}; use orion::numbers::{FixedTrait, FP8x23}; fn output_0() -> Tensor<FP8x23> { let mut shape = ArrayTrait::<usize>::new(); shape.append(5); let mut data = ArrayTrait::new(); data.append(FP8x23 { mag: 0, sign: false }); data.append(FP8x23 { mag: 8388608, sign: false }); data.append(FP8x23 { mag: 25165824, sign: false }); data.append(FP8x23 { mag: 50331648, sign: false }); data.append(FP8x23 { mag: 83886080, sign: false }); TensorTrait::new(shape.span(), data.span()) }
https://github.com/gizatechxyz/orion