text stringlengths 0 601k |
|---|
let nth_dim ( ) = Alcotest . ( check bool ) " nth_dim " true ( To_test . nth_dim ( ) ) |
let numel ( ) = Alcotest . ( check bool ) " numel " true ( To_test . numel ( ) ) |
let nnz ( ) = Alcotest . ( check bool ) " nnz " true ( To_test . nnz ( ) ) |
let density ( ) = Alcotest . ( check bool ) " density " true ( To_test . density ( ) ) |
let get ( ) = Alcotest . ( check bool ) " get " true ( To_test . get ( ) ) |
let set ( ) = Alcotest . ( check bool ) " set " true ( To_test . set ( ) ) |
let get_slice ( ) = Alcotest . ( check bool ) " get_slice " true ( To_test . get_slice ( ) ) |
let copy ( ) = Alcotest . ( check bool ) " copy " true ( To_test . copy ( ) ) |
let fill ( ) = Alcotest . ( check bool ) " fill " true ( To_test . fill ( ) ) |
let map ( ) = Alcotest . ( check bool ) " map " true ( To_test . map ( ) ) |
let fold ( ) = Alcotest . ( check bool ) " fold " true ( To_test . fold ( ) ) |
let add ( ) = Alcotest . ( check bool ) " add " true ( To_test . add ( ) ) |
let mul ( ) = Alcotest . ( check bool ) " mul " true ( To_test . mul ( ) ) |
let add_scalar ( ) = Alcotest . ( check bool ) " add_scalar " true ( To_test . add_scalar ( ) ) |
let mul_scalar ( ) = Alcotest . ( check bool ) " mul_scalar " true ( To_test . mul_scalar ( ) ) |
let abs ( ) = Alcotest . ( check bool ) " abs " true ( To_test . abs ( ) ) |
let neg ( ) = Alcotest . ( check bool ) " neg " true ( To_test . neg ( ) ) |
let sum ' ( ) = Alcotest . ( check bool ) " sum ' " true ( To_test . sum ' ( ) ) |
let median ' ( ) = Alcotest . ( check bool ) " median ' " true ( To_test . median ' ( ) ) |
let median ( ) = Alcotest . ( check bool ) " median " true ( To_test . median ( ) ) |
let sort1 ( ) = Alcotest . ( check bool ) " sort1 " true ( To_test . sort1 ( ) ) |
let sum_reduce ( ) = Alcotest . ( check bool ) " sum_reduce " true ( To_test . sum_reduce ( ) ) |
let min ' ( ) = Alcotest . ( check bool ) " min ' " true ( To_test . min ' ( ) ) |
let max ' ( ) = Alcotest . ( check bool ) " max ' " true ( To_test . max ' ( ) ) |
let minmax_i ( ) = Alcotest . ( check bool ) " minmax_i " true ( To_test . minmax_i ( ) ) |
let init_nd ( ) = Alcotest . ( check bool ) " init_nd " true ( To_test . init_nd ( ) ) |
let is_zero ( ) = Alcotest . ( check bool ) " is_zero " false ( To_test . is_zero ( ) ) |
let is_positive ( ) = Alcotest . ( check bool ) " is_positive " false ( To_test . is_positive ( ) ) |
let is_negative ( ) = Alcotest . ( check bool ) " is_negative " false ( To_test . is_negative ( ) ) |
let is_nonnegative ( ) = Alcotest . ( check bool ) " is_nonnegative " true ( To_test . is_nonnegative ( ) ) |
let equal ( ) = Alcotest . ( check bool ) " equal " false ( To_test . equal ( ) ) |
let greater ( ) = Alcotest . ( check bool ) " greater " false ( To_test . greater ( ) ) |
let greater_equal ( ) = Alcotest . ( check bool ) " greater_equal " true ( To_test . greater_equal ( ) ) |
let exists ( ) = Alcotest . ( check bool ) " exists " true ( To_test . exists ( ) ) |
let not_exists ( ) = Alcotest . ( check bool ) " not_exists " true ( To_test . not_exists ( ) ) |
let for_all ( ) = Alcotest . ( check bool ) " for_all " true ( To_test . for_all ( ) ) |
let transpose ( ) = Alcotest . ( check bool ) " transpose " true ( To_test . transpose ( ) ) |
let flatten ( ) = Alcotest . ( check bool ) " flatten " true ( To_test . flatten ( ) ) |
let reshape ( ) = Alcotest . ( check bool ) " reshape " true ( To_test . reshape ( ) ) |
let l2norm ' ( ) = Alcotest . ( check bool ) " l2norm ' " true ( To_test . l2norm ' ( ) ) |
let save_load ( ) = Alcotest . ( check bool ) " save_load " true ( To_test . save_load ( ) ) |
let broadcast_add ( ) = Alcotest . ( check bool ) " broadcast_add " true ( To_test . broadcast_add ( ) ) |
let reverse ( ) = Alcotest . ( check bool ) " reverse " true ( To_test . reverse ( ) ) |
let rotate ( ) = Alcotest . ( check bool ) " rotate " true ( To_test . rotate ( ) ) |
let same_shape_1 ( ) = Alcotest . ( check bool ) " same_shape_1 " true ( To_test . same_shape_1 ( ) ) |
let same_shape_2 ( ) = Alcotest . ( check bool ) " same_shape_2 " true ( To_test . same_shape_2 ( ) ) |
let same_shape_3 ( ) = Alcotest . ( check bool ) " same_shape_3 " true ( To_test . same_shape_3 ( ) ) |
let same_shape_4 ( ) = Alcotest . ( check bool ) " same_shape_4 " true ( To_test . same_shape_4 ( ) ) |
let same_shape_5 ( ) = Alcotest . ( check bool ) " same_shape_5 " true ( To_test . same_shape_5 ( ) ) |
let linspace ( ) = Alcotest . ( check bool ) " linspace " true ( To_test . linspace ( ) ) |
let logspace_2 ( ) = Alcotest . ( check bool ) " logspace_2 " true ( To_test . logspace_2 ( ) ) |
let logspace_10 ( ) = Alcotest . ( check bool ) " logspace_10 " true ( To_test . logspace_10 ( ) ) |
let logspace_e ( ) = Alcotest . ( check bool ) " logspace_e " true ( To_test . logspace_e ( ) ) |
let vecnorm_01 ( ) = Alcotest . ( check bool ) " vecnorm_01 " true ( To_test . vecnorm_01 ( ) ) |
let vecnorm_02 ( ) = Alcotest . ( check bool ) " vecnorm_02 " true ( To_test . vecnorm_02 ( ) ) |
let vecnorm_03 ( ) = Alcotest . ( check bool ) " vecnorm_03 " true ( To_test . vecnorm_03 ( ) ) |
let vecnorm_04 ( ) = Alcotest . ( check bool ) " vecnorm_04 " true ( To_test . vecnorm_04 ( ) ) |
let vecnorm_05 ( ) = Alcotest . ( check bool ) " vecnorm_05 " true ( To_test . vecnorm_05 ( ) ) |
let vecnorm_06 ( ) = Alcotest . ( check bool ) " vecnorm_06 " true ( To_test . vecnorm_06 ( ) ) |
let vecnorm_07 ( ) = Alcotest . ( check bool ) " vecnorm_07 " true ( To_test . vecnorm_07 ( ) ) |
let vecnorm_08 ( ) = Alcotest . ( check bool ) " vecnorm_08 " true ( To_test . vecnorm_08 ( ) ) |
let vecnorm_09 ( ) = Alcotest . ( check bool ) " vecnorm_09 " true ( To_test . vecnorm_09 ( ) ) |
let vecnorm_10 ( ) = Alcotest . ( check bool ) " vecnorm_10 " true ( To_test . vecnorm_10 ( ) ) |
let expand_01 ( ) = Alcotest . ( check bool ) " expand_01 " true ( To_test . expand_01 ( ) ) |
let expand_02 ( ) = Alcotest . ( check bool ) " expand_02 " true ( To_test . expand_02 ( ) ) |
let concatenate_01 ( ) = Alcotest . ( check bool ) " concatenate_01 " true ( To_test . concatenate_01 ( ) ) |
let concatenate_02 ( ) = Alcotest . ( check bool ) " concatenate_02 " true ( To_test . concatenate_02 ( ) ) |
let stack_1 ( ) = Alcotest . ( check bool ) " stack_1 " true ( To_test . stack_1 ( ) ) |
let stack_2 ( ) = Alcotest . ( check bool ) " stack_2 " true ( To_test . stack_2 ( ) ) |
let stack_3 ( ) = Alcotest . ( check bool ) " stack_3 " true ( To_test . stack_3 ( ) ) |
let stack_4 ( ) = Alcotest . ( check bool ) " stack_4 " true ( To_test . stack_4 ( ) ) |
let stack_5 ( ) = Alcotest . ( check bool ) " stack_5 " true ( To_test . stack_5 ( ) ) |
let diff_1 ( ) = Alcotest . ( check bool ) " diff_1 " true ( To_test . diff_1 ( ) ) |
let diff_2 ( ) = Alcotest . ( check bool ) " diff_2 " true ( To_test . diff_2 ( ) ) |
let one_hot_1 ( ) = Alcotest . ( check bool ) " one_hot_1 " true ( To_test . one_hot_1 ( ) ) |
let one_hot_2 ( ) = Alcotest . ( check bool ) " one_hot_2 " true ( To_test . one_hot_2 ( ) ) |
let sort ( ) = Alcotest . ( check bool ) " sort " true ( To_test . sort ( ) ) |
let argsort_1 ( ) = Alcotest . ( check bool ) " argsort_1 " true ( To_test . argsort_1 ( ) ) |
let argsort_2 ( ) = Alcotest . ( check bool ) " argsort_2 " true ( To_test . argsort_2 ( ) ) |
let top_1 ( ) = Alcotest . ( check bool ) " top_1 " true ( To_test . top_1 ( ) ) |
let top_2 ( ) = Alcotest . ( check bool ) " top_2 " true ( To_test . top_2 ( ) ) |
let top_3 ( ) = Alcotest . ( check bool ) " top_3 " true ( To_test . top_3 ( ) ) |
let bottom_1 ( ) = Alcotest . ( check bool ) " bottom_1 " true ( To_test . bottom_1 ( ) ) |
let bottom_2 ( ) = Alcotest . ( check bool ) " bottom_2 " true ( To_test . bottom_2 ( ) ) |
let pad ( ) = Alcotest . ( check bool ) " pad " true ( To_test . pad ( ) ) |
let test_set = [ " shape " , ` Slow , shape ; " num_dims " , ` Slow , num_dims ; " nth_dim " , ` Slow , nth_dim ; " numel " , ` Slow , numel ; " nnz " , ` Slow , nnz ; " density " , ` Slow , density ; " get " , ` Slow , get ; " set " , ` Slow , set ; " get_slice " , ` Slow , get_slice ; " copy " , ` Slow , copy ; " fil... |
let close a b = N . ( sub a b |> abs |> sum ' ) < tolerance_f32 |
let test_dilated_conv2d ( ? stride = [ | 1 ; 1 ] ) | input_shape kernel_shape rate pad = let inp = N . sequential ~ a : 1 . input_shape in let kernel = N . sequential ~ a : 1 . kernel_shape in N . dilated_conv2d ~ padding : pad inp kernel stride rate |
let test_dilated_conv2d_bi ( ? stride = [ | 1 ; 1 ] ) | input_shape kernel_shape rate pad = let inp = N . sequential ~ a : 1 . input_shape in let kernel = N . sequential ~ a : 1 . kernel_shape in let output = N . dilated_conv2d ~ padding : pad inp kernel stride rate in let output_shape = N . shape output in let output ... |
let test_dilated_conv2d_bk ( ? stride = [ | 1 ; 1 ] ) | input_shape kernel_shape rate pad = let inp = N . sequential ~ a : 1 . input_shape in let kernel = N . sequential ~ a : 1 . kernel_shape in let output = N . dilated_conv2d ~ padding : pad inp kernel stride rate in let output_shape = N . shape output in let output ... |
let verify_value fn input_shape kernel_shape stride pad expected = let a = fn input_shape kernel_shape stride pad in let output_shape = N . shape a in let b = N . of_array expected output_shape in close a b |
module To_test_dilated_conv2d = struct let fun00 ( ) = let expected = [ | 22383 . ; 23274 . ; 54135 . ; 56790 . ] | in verify_value test_dilated_conv2d [ | 2 ; 7 ; 7 ; 2 ] | [ | 3 ; 3 ; 2 ; 2 ] | [ | 3 ; 3 ] | VALID expected let fun01 ( ) = let expected = [ | 430 . ; 458 . ; 486 . ; 672 . ; 402 . ; 426 . ; 450 . ; 626 ... |
module To_test_dilated_conv2d_bi = struct let fun00 ( ) = let expected = [ | 5 . ; 11 . ; 11 . ; 25 . ; 17 . ; 23 . ; 39 . ; 53 . ; 29 . ; 35 . ; 67 . ; 81 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 41 . ; 47 . ; 95 . ; 109 . ; 53 . ; 59 . ; 123 . ; 137 . ; 65 . ; 71 . ; 151 . ; 165 . ;... |
module To_test_dilated_conv2d_bk = struct let fun00 ( ) = let expected = [ | 756 . ; 884 . ; 772 . ; 904 . ; 820 . ; 964 . ; 836 . ; 984 . ; 884 . ; 1044 . ; 900 . ; 1064 . ; 1140 . ; 1364 . ; 1156 . ; 1384 . ; 1204 . ; 1444 . ; 1220 . ; 1464 . ; 1268 . ; 1524 . ; 1284 . ; 1544 . ; 1524 . ; 1844 . ; 1540 . ; 1864 . ; 1... |
let fun_cdf00 ( ) = Alcotest . ( check bool ) " fun_cdf00 " true ( To_test_dilated_conv2d . fun00 ( ) ) |
let fun_cdf01 ( ) = Alcotest . ( check bool ) " fun_cdf01 " true ( To_test_dilated_conv2d . fun01 ( ) ) |
let fun_cdf02 ( ) = Alcotest . ( check bool ) " fun_cdf02 " true ( To_test_dilated_conv2d . fun02 ( ) ) |
let fun_cdf03 ( ) = Alcotest . ( check bool ) " fun_cdf03 " true ( To_test_dilated_conv2d . fun03 ( ) ) |
let fun_cdf04 ( ) = Alcotest . ( check bool ) " fun_cdf04 " true ( To_test_dilated_conv2d . fun04 ( ) ) |
let fun_cdf05 ( ) = Alcotest . ( check bool ) " fun_cdf05 " true ( To_test_dilated_conv2d . fun05 ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.