package caisar
A platform for characterizing the safety and robustness of artificial intelligence based software
Install
Dune Dependency
Authors
Maintainers
Sources
caisar-2.1.tbz
sha256=1b25c8668d428bcfc83c95147b6e45ff0a3bfa05ecd11369d12e963e29819e2e
sha512=edc7d7c0e96802811de3cb1caa3d14cc3d867ee7310748e8188eca9246a362549545c7816c8037511931dc4b7770b5ccc11b0d03abe8843b7c4db7880bf8e1fd
doc/src/caisar.nir/gentensor.ml.html
Source file gentensor.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
(**************************************************************************) (* *) (* This file is part of CAISAR. *) (* *) (* Copyright (C) 2024 *) (* CEA (Commissariat à l'énergie atomique et aux énergies *) (* alternatives) *) (* *) (* You can redistribute it and/or modify it under the terms of the GNU *) (* Lesser General Public License as published by the Free Software *) (* Foundation, version 2.1. *) (* *) (* It is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU Lesser General Public License for more details. *) (* *) (* See the GNU Lesser General Public License version 2.1 *) (* for more details (enclosed in the file licenses/LGPLv2.1). *) (* *) (**************************************************************************) open Base type t = | Float of (float, Bigarray.float64_elt) Tensor.t | Int64 of (int64, Bigarray.int64_elt) Tensor.t let create_1_float f = Float (Tensor.create_1_float f) let create_1_int64 i = Int64 (Tensor.create_1_int64 i) let of_int64_array ?shape t = let sh = match shape with | Some sh -> sh | None -> Shape.of_array [| Array.length t |] in let a = Bigarray.Array1.of_array Bigarray.Int64 Bigarray.c_layout t in Int64 (Tensor.of_array1 sh a) let of_float_array ?shape t = let sh = match shape with | Some sh -> sh | None -> Shape.of_array [| Array.length t |] in let a = Bigarray.Array1.of_array Bigarray.Float64 Bigarray.c_layout t in Float (Tensor.of_array1 sh a) let shape = function Float f -> Tensor.shape f | Int64 i -> Tensor.shape i
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>