package caisar
A platform for characterizing the safety and robustness of artificial intelligence based software
Install
Dune Dependency
Authors
Maintainers
Sources
caisar-2.0.tbz
sha256=3d24d2940eed0921acba158a8970687743c401c6a99d0aac8ed6dcfedca1429c
sha512=0b4484c0e080b8ba22722fe9d5665f9015ebf1648ac89c566a978dd54e3e061acb63edd92e078eed310e26f3e8ad2c48f3682a24af2acb1f0633da12f7966a38
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)"
>