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 ; " fill " , ` Slow , fill ; " map " , ` Slow , map ; " fold " , ` Slow , fold ; " add " , ` Slow , add ; " mul " , ` Slow , mul ; " add_scalar " , ` Slow , add_scalar ; " mul_scalar " , ` Slow , mul_scalar ; " abs " , ` Slow , abs ; " neg " , ` Slow , neg ; " sum ' " , ` Slow , sum ' ; " median ' " , ` Slow , median ' ; " median " , ` Slow , median ; " sort1 " , ` Slow , sort1 ; " sum_reduce " , ` Slow , sum_reduce ; " min ' " , ` Slow , min ' ; " max ' " , ` Slow , max ' ; " minmax_i " , ` Slow , minmax_i ; " init_nd " , ` Slow , init_nd ; " is_zero " , ` Slow , is_zero ; " is_positive " , ` Slow , is_positive ; " is_negative " , ` Slow , is_negative ; " is_nonnegative " , ` Slow , is_nonnegative ; " equal " , ` Slow , equal ; " greater " , ` Slow , greater ; " greater_equal " , ` Slow , greater_equal ; " exists " , ` Slow , exists ; " not_exists " , ` Slow , not_exists ; " for_all " , ` Slow , for_all ; " transpose " , ` Slow , transpose ; " flatten " , ` Slow , flatten ; " reshape " , ` Slow , reshape ; " l2norm ' " , ` Slow , l2norm ' ; " save_load " , ` Slow , save_load ; " broadcast_add " , ` Slow , broadcast_add ; " reverse " , ` Slow , reverse ; " rotate " , ` Slow , rotate ; " same_shape_1 " , ` Slow , same_shape_1 ; " same_shape_2 " , ` Slow , same_shape_2 ; " same_shape_3 " , ` Slow , same_shape_3 ; " same_shape_4 " , ` Slow , same_shape_4 ; " same_shape_5 " , ` Slow , same_shape_5 ; " linspace " , ` Slow , linspace ; " logspace_2 " , ` Slow , logspace_2 ; " logspace_10 " , ` Slow , logspace_10 ; " logspace_e " , ` Slow , logspace_e ; " vecnorm_01 " , ` Slow , vecnorm_01 ; " vecnorm_02 " , ` Slow , vecnorm_02 ; " vecnorm_03 " , ` Slow , vecnorm_03 ; " vecnorm_04 " , ` Slow , vecnorm_04 ; " vecnorm_05 " , ` Slow , vecnorm_05 ; " vecnorm_06 " , ` Slow , vecnorm_06 ; " vecnorm_07 " , ` Slow , vecnorm_07 ; " vecnorm_08 " , ` Slow , vecnorm_08 ; " vecnorm_09 " , ` Slow , vecnorm_09 ; " vecnorm_10 " , ` Slow , vecnorm_10 ; " expand_01 " , ` Slow , expand_01 ; " expand_02 " , ` Slow , expand_02 ; " concatenate_01 " , ` Slow , concatenate_01 ; " concatenate_02 " , ` Slow , concatenate_02 ; " stack_1 " , ` Slow , stack_1 ; " stack_2 " , ` Slow , stack_2 ; " stack_3 " , ` Slow , stack_3 ; " stack_4 " , ` Slow , stack_4 ; " stack_5 " , ` Slow , stack_5 ; " diff_1 " , ` Slow , diff_1 ; " diff_2 " , ` Slow , diff_2 ; " one_hot_1 " , ` Slow , one_hot_1 ; " one_hot_2 " , ` Slow , one_hot_2 ; " sort " , ` Slow , sort ; " argsort_1 " , ` Slow , argsort_1 ; " argsort_2 " , ` Slow , argsort_2 ; " top_1 " , ` Slow , top_1 ; " top_2 " , ` Slow , top_2 ; " top_3 " , ` Slow , top_3 ; " bottom_1 " , ` Slow , bottom_1 ; " bottom_2 " , ` Slow , bottom_2 ; " pad " , ` Slow , pad ] |
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 ' = N . sequential ~ a : 1 . output_shape in N . dilated_conv2d_backward_input inp kernel stride rate 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 ' = N . sequential ~ a : 1 . output_shape in N . dilated_conv2d_backward_kernel inp kernel stride rate 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 . ; 654 . ; 682 . ; 945 . ; 570 . ; 594 . ; 618 . ; 822 . ; 850 . ; 878 . ; 1218 . ; 738 . ; 762 . ; 786 . ; 1032 . ; 1065 . ; 1098 . ; 1521 . ; 918 . ; 945 . ; 972 . ; 386 . ; 402 . ; 418 . ; 558 . ; 318 . ; 330 . ; 342 . ; 498 . ; 514 . ; 530 . ; 705 . ; 402 . ; 414 . ; 426 . ; 610 . ; 626 . ; 642 . ; 852 . ; 486 . ; 498 . ; 510 . ] | in verify_value test_dilated_conv2d [ | 1 ; 7 ; 7 ; 1 ] | [ | 3 ; 3 ; 1 ; 1 ] | [ | 3 ; 3 ] | SAME expected let fun02 ( ) = let expected = [ | 5 . ; 8 . ; 11 . ; 17 . ; 20 . ; 23 . ; 29 . ; 32 . ; 35 . ; 41 . ; 44 . ; 47 . ] | in verify_value test_dilated_conv2d [ | 1 ; 4 ; 4 ; 1 ] | [ | 1 ; 2 ; 1 ; 1 ] | [ | 1 ; 1 ] | VALID expected let fun03 ( ) = let expected = [ | 196 . ; 206 . ; 216 . ; 226 . ; 236 . ; 276 . ; 286 . ; 296 . ; 306 . ; 316 . ; 356 . ; 366 . ; 376 . ; 386 . ; 396 . ; 436 . ; 446 . ; 456 . ; 466 . ; 476 . ] | in verify_value test_dilated_conv2d [ | 1 ; 7 ; 8 ; 1 ] | [ | 2 ; 2 ; 1 ; 1 ] | [ | 3 ; 3 ] | VALID expected let fun04 ( ) = let expected = [ | 330 . ; 340 . ; 350 . ; 360 . ; 370 . ; 380 . ; 390 . ; 400 . ] | in verify_value test_dilated_conv2d [ | 1 ; 7 ; 8 ; 1 ] | [ | 4 ; 1 ; 1 ; 1 ] | [ | 2 ; 3 ] | VALID expected let fun05 ( ) = let expected = [ | 1 . ; 2 . ; 3 . ; 4 . ] | in verify_value test_dilated_conv2d [ | 1 ; 2 ; 2 ; 1 ] | [ | 1 ; 1 ; 1 ; 1 ] | [ | 4 ; 4 ] | VALID expected let fun06 ( ) = let expected = [ | 1155 . ; 1245 . ; 1875 . ; 1965 . ] | in verify_value ( test_dilated_conv2d ~ stride [ :| 2 ; 2 ] ) | [ | 1 ; 7 ; 8 ; 1 ] | [ | 3 ; 3 ; 1 ; 1 ] | [ | 2 ; 2 ] | VALID expected end |
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 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 77 . ; 83 . ; 179 . ; 193 . ; 89 . ; 95 . ; 207 . ; 221 . ; 101 . ; 107 . ; 235 . ; 249 . ; 17 . ; 39 . ; 23 . ; 53 . ; 61 . ; 83 . ; 83 . ; 113 . ; 105 . ; 127 . ; 143 . ; 173 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 149 . ; 171 . ; 203 . ; 233 . ; 193 . ; 215 . ; 263 . ; 293 . ; 237 . ; 259 . ; 323 . ; 353 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 281 . ; 303 . ; 383 . ; 413 . ; 325 . ; 347 . ; 443 . ; 473 . ; 369 . ; 391 . ; 503 . ; 533 . ] | in verify_value test_dilated_conv2d_bi [ | 2 ; 5 ; 6 ; 2 ] | [ | 3 ; 3 ; 2 ; 2 ] | [ | 2 ; 2 ] | VALID expected let fun01 ( ) = let expected = [ | 90 . ; 102 . ; 114 . ; 198 . ; 158 . ; 174 . ; 190 . ; 174 . ; 186 . ; 198 . ; 345 . ; 270 . ; 286 . ; 302 . ; 258 . ; 270 . ; 282 . ; 492 . ; 382 . ; 398 . ; 414 . ; 378 . ; 405 . ; 432 . ; 729 . ; 552 . ; 585 . ; 618 . ; 414 . ; 438 . ; 462 . ; 732 . ; 522 . ; 550 . ; 578 . ; 582 . ; 606 . ; 630 . ; 1005 . ; 718 . ; 746 . ; 774 . ; 750 . ; 774 . ; 798 . ; 1278 . ; 914 . ; 942 . ; 970 . ] | in verify_value test_dilated_conv2d_bi [ | 1 ; 7 ; 7 ; 1 ] | [ | 3 ; 3 ; 1 ; 1 ] | [ | 3 ; 3 ] | SAME expected let fun02 ( ) = let expected = [ | 4 . ; 10 . ; 16 . ; 17 . ; 29 . ; 62 . ; 83 . ; 75 . ; 77 . ; 146 . ; 167 . ; 139 . ; 125 . ; 230 . ; 251 . ; 203 . ] | in verify_value test_dilated_conv2d_bi [ | 1 ; 4 ; 4 ; 1 ] | [ | 2 ; 3 ; 1 ; 1 ] | [ | 1 ; 1 ] | SAME expected let fun03 ( ) = let expected = [ | 1 . ; 0 . ; 2 . ; 0 . ; 3 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 4 . ; 0 . ; 5 . ; 0 . ; 6 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 7 . ; 0 . ; 8 . ; 0 . ; 9 . ] | in verify_value test_dilated_conv2d_bi [ | 1 ; 5 ; 5 ; 1 ] | [ | 3 ; 3 ; 1 ; 1 ] | [ | 2 ; 2 ] | VALID expected let fun04 ( ) = let expected = [ | 1 . ; 2 . ; 3 . ; 4 . ; 5 . ; 6 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 2 . ; 4 . ; 6 . ; 8 . ; 10 . ; 12 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 3 . ; 6 . ; 9 . ; 12 . ; 15 . ; 18 . ] | in verify_value test_dilated_conv2d_bi [ | 1 ; 5 ; 6 ; 1 ] | [ | 3 ; 1 ; 1 ; 1 ] | [ | 2 ; 3 ] | VALID expected let fun05 ( ) = let expected = [ | 1 . ; 2 . ; 3 . ; 4 . ] | in verify_value test_dilated_conv2d_bi [ | 1 ; 2 ; 2 ; 1 ] | [ | 1 ; 1 ; 1 ; 1 ] | [ | 3 ; 3 ] | SAME expected let fun06 ( ) = let expected = [ | 134 . ; 154 . ; 174 . ; 294 . ; 314 . ; 334 . ; 454 . ; 474 . ; 494 . ] | in verify_value ( test_dilated_conv2d_bk ~ stride [ :| 2 ; 2 ] ) | [ | 1 ; 7 ; 8 ; 1 ] | [ | 3 ; 3 ; 1 ; 1 ] | [ | 2 ; 2 ] | VALID expected end |
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 . ; 1588 . ; 1924 . ; 1604 . ; 1944 . ; 1652 . ; 2004 . ; 1668 . ; 2024 . ] | in verify_value test_dilated_conv2d_bk [ | 2 ; 5 ; 6 ; 2 ] | [ | 3 ; 3 ; 2 ; 2 ] | [ | 2 ; 2 ] | VALID expected let fun01 ( ) = let expected = [ | 8696 . ; 16240 . ; 9704 . ; 22960 . ; 40425 . ; 22960 . ; 9704 . ; 16240 . ; 8696 . ] | in verify_value test_dilated_conv2d_bk [ | 1 ; 7 ; 7 ; 1 ] | [ | 3 ; 3 ; 1 ; 1 ] | [ | 3 ; 3 ] | SAME expected let fun02 ( ) = let expected = [ | 12655 . ; 13120 . ; 13585 . ; 15910 . ; 16375 . ; 16840 . ] | in verify_value test_dilated_conv2d_bk [ | 1 ; 7 ; 7 ; 1 ] | [ | 2 ; 3 ; 1 ; 1 ] | [ | 1 ; 1 ] | VALID expected let fun03 ( ) = let expected = [ | 1090 . ; 1246 . ; 1402 . ; 2338 . ; 2494 . ; 2650 . ; 3586 . ; 3742 . ; 3898 . ] | in verify_value test_dilated_conv2d_bk [ | 1 ; 7 ; 8 ; 1 ] | [ | 3 ; 3 ; 1 ; 1 ] | [ | 2 ; 2 ] | VALID expected let fun04 ( ) = let expected = [ | 55 . ; 100 . ; 295 . ; 340 . ; 535 . ; 580 . ; 775 . ; 820 . ] | in verify_value test_dilated_conv2d_bk [ | 1 ; 7 ; 8 ; 1 ] | [ | 4 ; 2 ; 1 ; 1 ] | [ | 2 ; 3 ] | VALID expected let fun05 ( ) = let expected = [ | 30 . ] | in verify_value test_dilated_conv2d_bk [ | 1 ; 2 ; 2 ; 1 ] | [ | 1 ; 1 ; 1 ; 1 ] | [ | 3 ; 3 ] | VALID expected let fun06 ( ) = let expected = [ | 1 . ; 0 . ; 4 . ; 0 . ; 7 . ; 0 . ; 6 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 7 . ; 0 . ; 23 . ; 0 . ; 33 . ; 0 . ; 24 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 19 . ; 0 . ; 53 . ; 0 . ; 63 . ; 0 . ; 42 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 0 . ; 21 . ; 0 . ; 52 . ; 0 . ; 59 . ; 0 . ; 36 . ; 0 . ] | in verify_value ( test_dilated_conv2d_bi ~ stride [ :| 2 ; 2 ] ) | [ | 1 ; 7 ; 8 ; 1 ] | [ | 3 ; 3 ; 1 ; 1 ] | [ | 2 ; 2 ] | VALID expected end |
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.