package torch
PyTorch bindings for OCaml
Install
Dune Dependency
Authors
Maintainers
Sources
0.5.tar.gz
md5=112bc4eef842883abdf25e150dc7952b
sha512=1670f337e5a00aa6acda9182b71c586cd817ed565ab1df280bba30f610760affb0d1fc859abe5f33bf78323cf3bf2391ad0b3d955aedff3894aae70723997705
doc/src/torch.core/kind.ml.html
Source file kind.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
type t = | Uint8 | Int8 | Int16 | Int | Int64 | Half | Float | Double | ComplexHalf | ComplexFloat | ComplexDouble (* Hardcoded, should match ScalarType.h *) let to_int = function | Uint8 -> 0 | Int8 -> 1 | Int16 -> 2 | Int -> 3 | Int64 -> 4 | Half -> 5 | Float -> 6 | Double -> 7 | ComplexHalf -> 8 | ComplexFloat -> 9 | ComplexDouble -> 10 let of_int_exn = function | 0 -> Uint8 | 1 -> Int8 | 2 -> Int16 | 3 -> Int | 4 -> Int64 | 5 -> Half | 6 -> Float | 7 -> Double | 8 -> ComplexHalf | 9 -> ComplexFloat | 10 -> ComplexDouble | d -> failwith (Printf.sprintf "unexpected kind %d" d) let ( = ) = Pervasives.( = ) let ( <> ) = Pervasives.( <> )
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>