text stringlengths 0 601k |
|---|
let fun_cdf06 ( ) = Alcotest . ( check bool ) " fun_cdf06 " true ( To_test_dilated_conv2d . fun06 ( ) ) |
let fun_cdbi00 ( ) = Alcotest . ( check bool ) " fun_cdbi00 " true ( To_test_dilated_conv2d_bi . fun00 ( ) ) |
let fun_cdbi01 ( ) = Alcotest . ( check bool ) " fun_cdbi01 " true ( To_test_dilated_conv2d_bi . fun01 ( ) ) |
let fun_cdbi02 ( ) = Alcotest . ( check bool ) " fun_cdbi02 " true ( To_test_dilated_conv2d_bi . fun02 ( ) ) |
let fun_cdbi03 ( ) = Alcotest . ( check bool ) " fun_cdbi03 " true ( To_test_dilated_conv2d_bi . fun03 ( ) ) |
let fun_cdbi04 ( ) = Alcotest . ( check bool ) " fun_cdbi04 " true ( To_test_dilated_conv2d_bi . fun04 ( ) ) |
let fun_cdbi05 ( ) = Alcotest . ( check bool ) " fun_cdbi05 " true ( To_test_dilated_conv2d_bi . fun05 ( ) ) |
let fun_cdbi06 ( ) = Alcotest . ( check bool ) " fun_cdbi06 " true ( To_test_dilated_conv2d_bi . fun06 ( ) ) |
let fun_cdbk00 ( ) = Alcotest . ( check bool ) " fun_cdbk00 " true ( To_test_dilated_conv2d_bk . fun00 ( ) ) |
let fun_cdbk01 ( ) = Alcotest . ( check bool ) " fun_cdbk01 " true ( To_test_dilated_conv2d_bk . fun01 ( ) ) |
let fun_cdbk02 ( ) = Alcotest . ( check bool ) " fun_cdbk02 " true ( To_test_dilated_conv2d_bk . fun02 ( ) ) |
let fun_cdbk03 ( ) = Alcotest . ( check bool ) " fun_cdbk03 " true ( To_test_dilated_conv2d_bk . fun03 ( ) ) |
let fun_cdbk04 ( ) = Alcotest . ( check bool ) " fun_cdbk04 " true ( To_test_dilated_conv2d_bk . fun04 ( ) ) |
let fun_cdbk05 ( ) = Alcotest . ( check bool ) " fun_cdbk05 " true ( To_test_dilated_conv2d_bk . fun05 ( ) ) |
let fun_cdbk06 ( ) = Alcotest . ( check bool ) " fun_cdbk06 " true ( To_test_dilated_conv2d_bk . fun06 ( ) ) |
let test_set = [ " fun_cdf00 " , ` Slow , fun_cdf00 ; " fun_cdf01 " , ` Slow , fun_cdf01 ; " fun_cdf02 " , ` Slow , fun_cdf02 ; " fun_cdf03 " , ` Slow , fun_cdf03 ; " fun_cdf04 " , ` Slow , fun_cdf04 ; " fun_cdf05 " , ` Slow , fun_cdf05 ; " fun_cdf06 " , ` Slow , fun_cdf06 ; " fun_cdbi00 " , ` Slow , fun_cdbi00 ; " fun... |
let close a b = N . ( sub a b |> abs |> sum ' ) < tolerance_f32 |
let test_dilated_conv3d ( ? stride = [ | 1 ; 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_conv3d ~ padding : pad inp kernel stride rate |
let test_dilated_conv3d_bi ( ? stride = [ | 1 ; 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_conv3d ~ padding : pad inp kernel stride rate in let output_shape = N . shape output in let out... |
let test_dilated_conv3d_bk ( ? stride = [ | 1 ; 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_conv3d ~ padding : pad inp kernel stride rate in let output_shape = N . shape output in let out... |
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_conv3d = struct let fun00 ( ) = let expected = [ | 255789 . ; 627039 . ] | in verify_value test_dilated_conv3d [ | 2 ; 5 ; 5 ; 5 ; 2 ] | [ | 3 ; 3 ; 3 ; 2 ; 1 ] | [ | 2 ; 2 ; 2 ] | VALID expected let fun01 ( ) = let expected = [ | 832 . ; 860 . ; 888 . ; 916 . ; 944 . ; 972 . ; 1305 . ; 1344 . ; ... |
module To_test_dilated_conv3d_bi = struct let fun00 ( ) = let expected = [ | 2 . ; 4 . ; 8 . ; 18 . ; 6 . ; 8 . ; 28 . ; 38 . ; 14 . ; 32 . ; 20 . ; 46 . ; 50 . ; 68 . ; 72 . ; 98 . ; 10 . ; 12 . ; 48 . ; 58 . ; 14 . ; 16 . ; 68 . ; 78 . ; 86 . ; 104 . ; 124 . ; 150 . ; 122 . ; 140 . ; 176 . ; 202 . ; 26 . ; 60 . ; 32 ... |
module To_test_dilated_conv3d_bk = struct let fun00 ( ) = let expected = [ | 52176 . ; 54416 . ; 52432 . ; 54688 . ; 53200 . ; 55504 . ; 53456 . ; 55776 . ; 54224 . ; 56592 . ; 54480 . ; 56864 . ; 76752 . ; 80528 . ; 77008 . ; 80800 . ; 77776 . ; 81616 . ; 78032 . ; 81888 . ; 78800 . ; 82704 . ; 79056 . ; 82976 . ; 101... |
let fun_cdf00 ( ) = Alcotest . ( check bool ) " fun_cdf00 " true ( To_test_dilated_conv3d . fun00 ( ) ) |
let fun_cdf01 ( ) = Alcotest . ( check bool ) " fun_cdf01 " true ( To_test_dilated_conv3d . fun01 ( ) ) |
let fun_cdf02 ( ) = Alcotest . ( check bool ) " fun_cdf02 " true ( To_test_dilated_conv3d . fun02 ( ) ) |
let fun_cdf03 ( ) = Alcotest . ( check bool ) " fun_cdf03 " true ( To_test_dilated_conv3d . fun03 ( ) ) |
let fun_cdf04 ( ) = Alcotest . ( check bool ) " fun_cdf04 " true ( To_test_dilated_conv3d . fun04 ( ) ) |
let fun_cdf05 ( ) = Alcotest . ( check bool ) " fun_cdf05 " true ( To_test_dilated_conv3d . fun05 ( ) ) |
let fun_cdf06 ( ) = Alcotest . ( check bool ) " fun_cdf06 " true ( To_test_dilated_conv3d . fun06 ( ) ) |
let fun_cdbi00 ( ) = Alcotest . ( check bool ) " fun_cdbi00 " true ( To_test_dilated_conv3d_bi . fun00 ( ) ) |
let fun_cdbi01 ( ) = Alcotest . ( check bool ) " fun_cdbi01 " true ( To_test_dilated_conv3d_bi . fun01 ( ) ) |
let fun_cdbi02 ( ) = Alcotest . ( check bool ) " fun_cdbi02 " true ( To_test_dilated_conv3d_bi . fun02 ( ) ) |
let fun_cdbi03 ( ) = Alcotest . ( check bool ) " fun_cdbi03 " true ( To_test_dilated_conv3d_bi . fun03 ( ) ) |
let fun_cdbi04 ( ) = Alcotest . ( check bool ) " fun_cdbi04 " true ( To_test_dilated_conv3d_bi . fun04 ( ) ) |
let fun_cdbi05 ( ) = Alcotest . ( check bool ) " fun_cdbi05 " true ( To_test_dilated_conv3d_bi . fun05 ( ) ) |
let fun_cdbi06 ( ) = Alcotest . ( check bool ) " fun_cdbi06 " true ( To_test_dilated_conv3d_bi . fun06 ( ) ) |
let fun_cdbk00 ( ) = Alcotest . ( check bool ) " fun_cdbk00 " true ( To_test_dilated_conv3d_bk . fun00 ( ) ) |
let fun_cdbk01 ( ) = Alcotest . ( check bool ) " fun_cdbk01 " true ( To_test_dilated_conv3d_bk . fun01 ( ) ) |
let fun_cdbk02 ( ) = Alcotest . ( check bool ) " fun_cdbk02 " true ( To_test_dilated_conv3d_bk . fun02 ( ) ) |
let fun_cdbk03 ( ) = Alcotest . ( check bool ) " fun_cdbk03 " true ( To_test_dilated_conv3d_bk . fun03 ( ) ) |
let fun_cdbk04 ( ) = Alcotest . ( check bool ) " fun_cdbk04 " true ( To_test_dilated_conv3d_bk . fun04 ( ) ) |
let fun_cdbk05 ( ) = Alcotest . ( check bool ) " fun_cdbk05 " true ( To_test_dilated_conv3d_bk . fun05 ( ) ) |
let fun_cdbk06 ( ) = Alcotest . ( check bool ) " fun_cdbk06 " true ( To_test_dilated_conv3d_bk . fun06 ( ) ) |
let test_set = [ " fun_cdf00 " , ` Slow , fun_cdf00 ; " fun_cdf01 " , ` Slow , fun_cdf01 ; " fun_cdf02 " , ` Slow , fun_cdf02 ; " fun_cdf03 " , ` Slow , fun_cdf03 ; " fun_cdf04 " , ` Slow , fun_cdf04 ; " fun_cdf05 " , ` Slow , fun_cdf05 ; " fun_cdf06 " , ` Slow , fun_cdf06 ; " fun_cdbi00 " , ` Slow , fun_cdbi00 ; " fun... |
let e = begin true end |
let e = ( true : bool ) |
let e = true , false , true |
let e = Some true |
let e = ` _ true |
let e = true :: false :: true |
let e = [ true ; false ; true ; ] |
let e = [ | true ; false ; true ] | |
let e = { f1 = true ; f2 = false ; f3 = true ; } |
let e = { e with f1 = true ; f2 = false ; } |
let e = f true false true |
let e = !? true |
let e = true || false && true |
let e = 1 mod 1 land 1 lor 1 lxor 1 lsl 1 lsr 1 asr 1 |
let e = re . f1 <- true |
let e = a . ( 0 ) <- true |
let e = a . [ 0 ] <- true |
let e = if true then false else true |
let e = while true do ( ) done |
let e = for x = a to b do ( ) done |
let e = true ; false ; true |
let e = match true with | true -> false | false -> true |
let e = match true with | true -> false | false -> true |
let e = function | true -> false | false -> true |
let e = fun x ~ lbl1 ~ ( lbl2 : int ) ~ lbl3 : _a ? olbl1 ? ( olbl2 : ' a list = [ ] ) ? olbl3 : _c ? olbl4 : ( _d : bool = false ) ( ) when true -> true |
let e = fun x -> fun ~ lbl1 -> fun ~ ( lbl2 : int ) -> fun ~ lbl3 : _a -> fun ? olbl1 -> fun ? ( olbl2 : ' a list = [ ] ) -> fun ? olbl3 : _c when true -> fun ? olbl4 : ( _d : bool = false ) -> fun ( ) when true -> true |
let e x ~ lbl1 ~ ( lbl2 : int ) ~ lbl3 : _a ? olbl1 ? ( olbl2 : ' a list = [ ] ) ? olbl3 : _c ? olbl4 : ( _d : bool = false ) ( ) = true |
let e = try true with | Exit -> true | _ -> false |
let e = let rec a = true and _b = false in true |
let e = new foo |
let foo = object end |
let e = foo # bar1 |
let e = ( true :> bool ) |
let e = ( true : bool :> bool ) |
let e = assert true |
let e = lazy true |
let i = 12l + 0l |
let i = 12L + 0l |
let i = 12n + 0n |
let f = function | ' a ' . . ' z ' -> e1 | ' A ' . . ' Z ' | ' 0 ' . . ' 9 ' -> e2 |
let f = let module M = F ( struct end ) in M . f x |
module rec M : S = struct ; ; end struct ; ; end |
type t = private X of string | Y |
type t = private { f1 : t1 ; f2 : t2 } |
type t = private t ' |
let _ = let open F ( X ) in ( ) |
let _ = let x = 1 and y = 2 in { x ; y } |
let f = function | { x ; y ; _ } -> ( ) |
let f = fun ( type t ) ( x : t ) -> ( ) |
let f ( type t ) ( x : t ) = ( ) |
type m = ( module M . Sig with type t = ' b ) * unit |
let x = let m = ( module M : M . Sig with type t = ' b ) in let module M = ( val m : M . sig with type t = ' b ) in M |
module type S = sig include module type of M end |
module type S = sig include M0 with type t := t val x : unit end inherit ! cl val ! v = v method ! m = m end |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.