hasktorch (empty) → 0.0.1.0
raw patch · 55 files changed
+2922/−0 lines, 55 filesdep +QuickCheckdep +backpropdep +base
Dependencies added: QuickCheck, backprop, base, dimensions, generic-lens, ghc-typelits-natnormalise, hasktorch, hasktorch-ffi-th, hasktorch-ffi-thc, hasktorch-indef, hasktorch-signatures-partial, hasktorch-types-th, hasktorch-types-thc, hspec, microlens-platform, monad-loops, mtl, safe-exceptions, singletons, text, time, transformers
Files
- exe/Memcheck.hs +68/−0
- exe/Noop.hs +2/−0
- hasktorch.cabal +558/−0
- src/Torch/Byte.hs +29/−0
- src/Torch/Byte/Dynamic.hs +28/−0
- src/Torch/Byte/Storage.hs +13/−0
- src/Torch/Char.hs +29/−0
- src/Torch/Char/Dynamic.hs +28/−0
- src/Torch/Char/Storage.hs +13/−0
- src/Torch/Cuda/Byte.hs +29/−0
- src/Torch/Cuda/Byte/Dynamic.hs +28/−0
- src/Torch/Cuda/Byte/Storage.hs +13/−0
- src/Torch/Cuda/Char.hs +29/−0
- src/Torch/Cuda/Char/Dynamic.hs +28/−0
- src/Torch/Cuda/Char/Storage.hs +13/−0
- src/Torch/Cuda/Double.hs +84/−0
- src/Torch/Cuda/Double/Dynamic.hs +28/−0
- src/Torch/Cuda/Double/Storage.hs +4/−0
- src/Torch/Cuda/Int.hs +29/−0
- src/Torch/Cuda/Int/Dynamic.hs +28/−0
- src/Torch/Cuda/Int/Storage.hs +13/−0
- src/Torch/Cuda/Long.hs +35/−0
- src/Torch/Cuda/Long/Dynamic.hs +28/−0
- src/Torch/Cuda/Long/Storage.hs +13/−0
- src/Torch/Cuda/Short.hs +29/−0
- src/Torch/Cuda/Short/Dynamic.hs +28/−0
- src/Torch/Cuda/Short/Storage.hs +13/−0
- src/Torch/Double.hs +60/−0
- src/Torch/Double/Dynamic.hs +36/−0
- src/Torch/Double/Storage.hs +6/−0
- src/Torch/Float.hs +73/−0
- src/Torch/Float/Dynamic.hs +37/−0
- src/Torch/Float/Storage.hs +4/−0
- src/Torch/Int.hs +29/−0
- src/Torch/Int/Dynamic.hs +28/−0
- src/Torch/Int/Storage.hs +13/−0
- src/Torch/Long.hs +35/−0
- src/Torch/Long/Dynamic.hs +28/−0
- src/Torch/Long/Storage.hs +13/−0
- src/Torch/Short.hs +29/−0
- src/Torch/Short/Dynamic.hs +28/−0
- src/Torch/Short/Storage.hs +13/−0
- tests/GarbageCollectionSpec.hs +118/−0
- tests/MemorySpec.hs +100/−0
- tests/Orphans.hs +18/−0
- tests/RawLapackSVDSpec.hs +40/−0
- tests/Spec.hs +25/−0
- tests/Torch/Core/LogAddSpec.hs +37/−0
- tests/Torch/Core/RandomSpec.hs +161/−0
- tests/Torch/Prelude/Extras.hs +18/−0
- tests/Torch/Static/NN/AbsSpec.hs +29/−0
- tests/Torch/Static/NN/LinearSpec.hs +394/−0
- utils/Torch/Core/Exceptions.hs +109/−0
- utils/Torch/Core/LogAdd.hs +50/−0
- utils/Torch/Core/Random.hs +151/−0
+ exe/Memcheck.hs view
@@ -0,0 +1,68 @@+-- Output of:+-- # valgrind --tool=memcheck ./dist-newstyle/build/x86_64-linux/ghc-8.4.3/hasktorch-core-0.0.1.0/x/memcheck/noopt/build/memcheck/memcheck++{-++==19639== Memcheck, a memory error detector+==19639== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.+==19639== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info+==19639== Command: ./dist-newstyle/build/x86_64-linux/ghc-8.4.3/hasktorch-core-0.0.1.0/x/memcheck/noopt/build/memcheck/memcheck+==19639==+==19639== Warning: set address range perms: large range [0x51da000, 0x17bd0000) (defined)+==19639== Warning: set address range perms: large range [0x26eee000, 0x3b56e000) (defined)+==19639== Warning: set address range perms: large range [0x4200000000, 0x14200100000) (noaccess)+(0x0000000000000000,0x000000004a488ac0)+[0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0,31.0,32.0,33.0,34.0,35.0,36.0,37.0,38.0,39.0,40.0,41.0,42.0,43.0,44.0,45.0,46.0,47.0,48.0,49.0,50.0,51.0,52.0,53.0,54.0,55.0,56.0,57.0,58.0,59.0,60.0,61.0,62.0,63.0,64.0,65.0,66.0,67.0,68.0,69.0,70.0,71.0,72.0,73.0,74.0,75.0,76.0,77.0,78.0,79.0,80.0,81.0,82.0,83.0,84.0,85.0,86.0,87.0,88.0,89.0,90.0,91.0,92.0,93.0,94.0,95.0,96.0,97.0,98.0,99.0,100.0]+==19639== Invalid free() / delete / delete[] / realloc()+==19639== at 0x4C30D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)+==19639== by 0x6167A94: THFree (in /home/stites/git/hasktorch/vendor/aten/build/lib/libATen.so.1)+==19639== by 0x616800B: THDefaultAllocator_free (in /home/stites/git/hasktorch/vendor/aten/build/lib/libATen.so.1)+==19639== by 0x6169855: THDoubleStorage_free (in /home/stites/git/hasktorch/vendor/aten/build/lib/libATen.so.1)+==19639== by 0x43C4B9: free_DoubleStorage (finalizers.c:77)+==19639== by 0x560735: runCFinalizers (in /home/stites/git/hasktorch/dist-newstyle/build/x86_64-linux/ghc-8.4.3/hasktorch-core-0.0.1.0/x/memcheck/noopt/build/memcheck/memcheck)+==19639== by 0x560833: scheduleFinalizers (in /home/stites/git/hasktorch/dist-newstyle/build/x86_64-linux/ghc-8.4.3/hasktorch-core-0.0.1.0/x/memcheck/noopt/build/memcheck/memcheck)+==19639== by 0x567BA8: GarbageCollect (in /home/stites/git/hasktorch/dist-newstyle/build/x86_64-linux/ghc-8.4.3/hasktorch-core-0.0.1.0/x/memcheck/noopt/build/memcheck/memcheck)+==19639== by 0x5612DB: scheduleDoGC.constprop.23 (in /home/stites/git/hasktorch/dist-newstyle/build/x86_64-linux/ghc-8.4.3/hasktorch-core-0.0.1.0/x/memcheck/noopt/build/memcheck/memcheck)+==19639== by 0x561475: performGC_ (in /home/stites/git/hasktorch/dist-newstyle/build/x86_64-linux/ghc-8.4.3/hasktorch-core-0.0.1.0/x/memcheck/noopt/build/memcheck/memcheck)+==19639== by 0x4F800C: ??? (in /home/stites/git/hasktorch/dist-newstyle/build/x86_64-linux/ghc-8.4.3/hasktorch-core-0.0.1.0/x/memcheck/noopt/build/memcheck/memcheck)+==19639== Address 0x420000c010 is in a rw- anonymous segment+==19639==+==19639==+==19639== HEAP SUMMARY:+==19639== in use at exit: 2,295 bytes in 15 blocks+==19639== total heap usage: 73,694 allocs, 73,680 frees, 6,638,289 bytes allocated+==19639==+==19639== LEAK SUMMARY:+==19639== definitely lost: 0 bytes in 0 blocks+==19639== indirectly lost: 0 bytes in 0 blocks+==19639== possibly lost: 0 bytes in 0 blocks+==19639== still reachable: 2,295 bytes in 15 blocks+==19639== suppressed: 0 bytes in 0 blocks+==19639== Rerun with --leak-check=full to see details of leaked memory+==19639==+==19639== For counts of detected and suppressed errors, rerun with: -v+==19639== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)++-}++{-# LANGUAGE DataKinds #-}+module Main where++import Torch.Double.Storage+import System.Mem++-- TODO: test GC with different formats:+main = do+ -- let Just s = vector [0..100] :: Maybe (Tensor '[101])+ -- let s = vector [0..100] :: Dynamic+ -- print s++ let s = fromList [0..100]+ print $ storageState s+ print $ storagedata s+ performGC++ -- fromList [10..1990] >>= tensordata >>= print+ -- performMajorGC++
+ exe/Noop.hs view
@@ -0,0 +1,2 @@+main :: IO ()+main = putStrLn "package can be compiled!"
+ hasktorch.cabal view
@@ -0,0 +1,558 @@+cabal-version: 2.2+-- ================================================================ --+-- ======== This cabal file has been modified from dhall ========== --+-- ======== This constitutes the 0.0.1.0 release. ========== --+-- ======== Dhall can generate this file, but will never ========== --+-- ======== be able to upload to hackage. For more, see: ========== --+-- ==== https://github.com/haskell/hackage-server/issues/795 ====== --+-- ================================================================ --+name: hasktorch+version: 0.0.1.0+license: BSD-3-Clause+maintainer: Sam Stites <fnz@fgvgrf.vb>, Austin Huang <nhfgvau@nyhz.zvg.rqh> - cipher:ROT13+author: Hasktorch dev team+homepage: https://github.com/hasktorch/hasktorch#readme+bug-reports: https://github.com/hasktorch/hasktorch/issues+synopsis: Torch for tensors and neural networks in Haskell+description:+ Hasktorch is a library for tensors and neural networks in Haskell. It is an independent open source community project which leverages the core C libraries shared by Torch and PyTorch. This library leverages @cabal v2-build@ and @backpack@. *Note that this project is in early development and should only be used by contributing developers. Expect substantial changes to the library API as it evolves. Contributions and PRs are welcome (see details on github).*+category: Tensors, Machine Learning, AI+build-type: Simple++source-repository head+ type: git+ location: https://github.com/hasktorch/hasktorch++flag cuda+ description:+ build with THC support+ default: False++flag lite+ description:+ only build with Double and Long support+ default: False++library+ exposed-modules:+ Torch.Core.Exceptions+ Torch.Core.Random+ Torch.Core.LogAdd+ reexported-modules: Torch.Types.Numeric,+ Torch.Long,+ Torch.Long.Dynamic,+ Torch.Long.Storage,+ Torch.Double,+ Torch.Double.Dynamic,+ Torch.Double.Storage,+ Torch.Double.NN,+ Torch.Double.NN.Activation,+ Torch.Double.NN.Backprop,+ Torch.Double.NN.Conv1d,+ Torch.Double.NN.Conv2d,+ Torch.Double.NN.Criterion,+ Torch.Double.NN.Layers,+ Torch.Double.NN.Linear,+ Torch.Double.NN.Math,+ Torch.Double.NN.Padding,+ Torch.Double.NN.Pooling,+ Torch.Double.NN.Sampling,+ Torch.Double.Dynamic.NN,+ Torch.Double.Dynamic.NN.Activation,+ Torch.Double.Dynamic.NN.Pooling,+ Torch.Double.Dynamic.NN.Criterion+ hs-source-dirs: utils+ default-language: Haskell2010+ default-extensions: LambdaCase DataKinds TypeFamilies+ TypeSynonymInstances ScopedTypeVariables FlexibleContexts CPP+ build-depends:+ base (==4.7 || >4.7) && <5,+ -- containers ==0.5.10 || >0.5.10,+ -- deepseq ==1.3.0 || >1.3.0,+ dimensions ==1.0 || >1.0,+ -- managed (==1.0.0 || >1.0.0) && <1.1,+ -- microlens ==0.4.8 || >0.4.8,+ -- numeric-limits ==0.1.0 || >0.1.0,+ safe-exceptions ==0.1.0 || >0.1.0,+ singletons ==2.2 || >2.2,+ text ==1.2.2 || >1.2.2,+ -- typelits-witnesses ==0.2.3 || >0.2.3,+ hasktorch-cpu -any,+ hasktorch-ffi-th (==0.0.1 || >0.0.1) && <0.0.2,+ hasktorch-types-th (==0.0.1 || >0.0.1) && <0.0.2++ -- <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> --+ -- BEGIN EDITS+ -- <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> --+ if !flag(lite)+ reexported-modules:+ Torch.Byte,+ Torch.Byte.Dynamic,+ Torch.Byte.Storage,+ Torch.Char,+ Torch.Char.Dynamic,+ Torch.Char.Storage,+ Torch.Short,+ Torch.Short.Dynamic,+ Torch.Short.Storage,+ Torch.Int,+ Torch.Int.Dynamic,+ Torch.Int.Storage,+ Torch.Float,+ Torch.Float.Dynamic,+ Torch.Float.Storage++ if flag(cuda)+ build-depends:+ hasktorch-gpu -any+ reexported-modules:+ Torch.Cuda.Long,+ Torch.Cuda.Long.Dynamic,+ Torch.Cuda.Long.Storage,+ Torch.Cuda.Double,+ Torch.Cuda.Double.Dynamic,+ Torch.Cuda.Double.Storage,+ Torch.Cuda.Double.NN,+ Torch.Cuda.Double.NN.Activation,+ Torch.Cuda.Double.NN.Backprop,+ Torch.Cuda.Double.NN.Conv1d,+ Torch.Cuda.Double.NN.Conv2d,+ Torch.Cuda.Double.NN.Criterion,+ Torch.Cuda.Double.NN.Layers,+ Torch.Cuda.Double.NN.Linear,+ Torch.Cuda.Double.NN.Math,+ Torch.Cuda.Double.NN.Padding,+ Torch.Cuda.Double.NN.Pooling,+ Torch.Cuda.Double.NN.Sampling,+ Torch.Cuda.Double.Dynamic.NN,+ Torch.Cuda.Double.Dynamic.NN.Activation,+ Torch.Cuda.Double.Dynamic.NN.Pooling,+ Torch.Cuda.Double.Dynamic.NN.Criterion+ if !flag(lite)+ reexported-modules:+ Torch.Cuda.Byte,+ Torch.Cuda.Byte.Dynamic,+ Torch.Cuda.Byte.Storage,+ Torch.Cuda.Char,+ Torch.Cuda.Char.Dynamic,+ Torch.Cuda.Char.Storage,+ Torch.Cuda.Short,+ Torch.Cuda.Short.Dynamic,+ Torch.Cuda.Short.Storage,+ Torch.Cuda.Int,+ Torch.Cuda.Int.Dynamic,+ Torch.Cuda.Int.Storage,+ Torch.Cuda.Float,+ Torch.Cuda.Float.Dynamic,+ Torch.Cuda.Float.Storage+ -- <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> --+ -- END EDITS+ -- <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><> --++library hasktorch-cpu+ exposed-modules:+ Torch.Long+ Torch.Long.Dynamic+ Torch.Long.Storage+ Torch.Double+ Torch.Double.Dynamic+ Torch.Double.Storage+ reexported-modules: Torch.Double.NN,+ Torch.Double.NN.Activation,+ Torch.Double.NN.Backprop,+ Torch.Double.NN.Conv1d,+ Torch.Double.NN.Conv2d,+ Torch.Double.NN.Criterion,+ Torch.Double.NN.Layers,+ Torch.Double.NN.Linear,+ Torch.Double.NN.Math,+ Torch.Double.NN.Padding,+ Torch.Double.NN.Pooling,+ Torch.Double.NN.Sampling,+ Torch.Double.Dynamic.NN,+ Torch.Double.Dynamic.NN.Activation,+ Torch.Double.Dynamic.NN.Pooling,+ Torch.Double.Dynamic.NN.Criterion,+ Torch.Float.NN,+ Torch.Float.NN.Activation,+ Torch.Float.NN.Backprop,+ Torch.Float.NN.Conv1d,+ Torch.Float.NN.Conv2d,+ Torch.Float.NN.Criterion,+ Torch.Float.NN.Layers,+ Torch.Float.NN.Linear,+ Torch.Float.NN.Math,+ Torch.Float.NN.Padding,+ Torch.Float.NN.Pooling,+ Torch.Float.NN.Sampling,+ Torch.Float.Dynamic.NN,+ Torch.Float.Dynamic.NN.Activation,+ Torch.Float.Dynamic.NN.Pooling,+ Torch.Float.Dynamic.NN.Criterion+ hs-source-dirs: utils src+ other-modules:+ Torch.Core.Exceptions+ Torch.Core.Random+ Torch.Core.LogAdd+ default-language: Haskell2010+ default-extensions: LambdaCase DataKinds TypeFamilies+ TypeSynonymInstances ScopedTypeVariables FlexibleContexts CPP+ build-depends:+ base (==4.7 || >4.7) && <5,+ hasktorch-types-th (==0.0.1 || >0.0.1) && <0.0.2,+ -- containers ==0.5.10 || >0.5.10,+ -- deepseq ==1.3.0 || >1.3.0,+ dimensions ==1.0 || >1.0,+ hasktorch-ffi-th (==0.0.1 || >0.0.1) && <0.0.2,+ hasktorch-types-th (==0.0.1 || >0.0.1) && <0.0.2,+ -- managed (==1.0.0 || >1.0.0) && <1.1,+ -- microlens ==0.4.8 || >0.4.8,+ -- numeric-limits ==0.1.0 || >0.1.0,+ safe-exceptions ==0.1.0 || >0.1.0,+ singletons ==2.2 || >2.2,+ text ==1.2.2 || >1.2.2,+ -- typelits-witnesses ==0.2.3 || >0.2.3,+ hasktorch-indef-floating -any,+ hasktorch-indef-signed -any+ mixins: hasktorch-indef-signed (Torch.Indef.Storage as Torch.Indef.Long.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Long.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Long.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Long.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Long.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Long.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Long.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Long.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Long.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Long.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Long.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Long.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Long.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Long.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Long.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Long.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Long.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Long.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Long.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Long.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Long.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Long.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Long.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Long.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Long.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Long.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Long.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Long.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Long.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Long.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Long.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Long.Types, Torch.Indef.Index as Torch.Long.Index, Torch.Indef.Mask as Torch.Long.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Long.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise.Signed) requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Long, Torch.Sig.Storage as Torch.FFI.TH.Long.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Long.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Long.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Long.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Long.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Long.TensorMath),+ hasktorch-indef-floating (Torch.Indef.Storage as Torch.Indef.Double.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Double.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Double.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Double.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Double.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Double.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Double.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Double.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Double.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Double.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Double.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Double.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Double.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Double.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Double.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Double.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Double.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Double.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Double.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Double.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Double.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Double.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Double.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Double.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Double.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Double.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Double.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Double.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Double.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Double.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Double.Types, Torch.Indef.Index as Torch.Double.Index, Torch.Indef.Mask as Torch.Double.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Double.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Blas as Torch.Indef.Double.Dynamic.Tensor.Math.Blas, Torch.Indef.Dynamic.Tensor.Math.Lapack as Torch.Indef.Double.Dynamic.Tensor.Math.Lapack, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating as Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Floating, Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating as Torch.Indef.Double.Dynamic.Tensor.Math.Reduce.Floating, Torch.Indef.Dynamic.Tensor.Math.Floating as Torch.Indef.Double.Dynamic.Tensor.Math.Floating, Torch.Indef.Static.Tensor.Math.Blas as Torch.Indef.Double.Tensor.Math.Blas, Torch.Indef.Static.Tensor.Math.Lapack as Torch.Indef.Double.Tensor.Math.Lapack, Torch.Indef.Static.Tensor.Math.Pointwise.Floating as Torch.Indef.Double.Tensor.Math.Pointwise.Floating, Torch.Indef.Static.Tensor.Math.Reduce.Floating as Torch.Indef.Double.Tensor.Math.Reduce.Floating, Torch.Indef.Static.Tensor.Math.Floating as Torch.Indef.Double.Tensor.Math.Floating, Torch.Indef.Static.Tensor.Random.TH as Torch.Indef.Double.Tensor.Random.TH, Torch.Indef.Static.Tensor.Math.Random.TH as Torch.Indef.Double.Tensor.Math.Random.TH, Torch.Indef.Dynamic.Tensor.Random.TH as Torch.Indef.Double.Dynamic.Tensor.Random.TH, Torch.Indef.Dynamic.Tensor.Math.Random.TH as Torch.Indef.Double.Dynamic.Tensor.Math.Random.TH, Torch.Undefined.Tensor.Random.THC as Torch.Undefined.Double.Tensor.Random.THC, Torch.Indef.Storage as Torch.Indef.Double.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Double.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Double.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Double.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Double.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Double.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Double.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Double.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Double.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Double.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Double.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Double.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Double.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Double.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Double.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Double.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Double.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Double.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Double.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Double.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Double.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Double.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Double.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Double.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Double.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Double.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Double.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Double.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Double.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Double.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Double.Types, Torch.Indef.Index as Torch.Double.Index, Torch.Indef.Mask as Torch.Double.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Double.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.NN as Torch.Double.Dynamic.NN, Torch.Indef.Dynamic.NN.Activation as Torch.Double.Dynamic.NN.Activation, Torch.Indef.Dynamic.NN.Pooling as Torch.Double.Dynamic.NN.Pooling, Torch.Indef.Dynamic.NN.Criterion as Torch.Double.Dynamic.NN.Criterion, Torch.Indef.Static.NN as Torch.Double.NN, Torch.Indef.Static.NN as Torch.Double.NN, Torch.Indef.Static.NN.Activation as Torch.Double.NN.Activation, Torch.Indef.Static.NN.Backprop as Torch.Double.NN.Backprop, Torch.Indef.Static.NN.Conv1d as Torch.Double.NN.Conv1d, Torch.Indef.Static.NN.Conv2d as Torch.Double.NN.Conv2d, Torch.Indef.Static.NN.Criterion as Torch.Double.NN.Criterion, Torch.Indef.Static.NN.Layers as Torch.Double.NN.Layers, Torch.Indef.Static.NN.Linear as Torch.Double.NN.Linear, Torch.Indef.Static.NN.Math as Torch.Double.NN.Math, Torch.Indef.Static.NN.Padding as Torch.Double.NN.Padding, Torch.Indef.Static.NN.Pooling as Torch.Double.NN.Pooling, Torch.Indef.Static.NN.Sampling as Torch.Double.NN.Sampling) requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Double, Torch.Sig.Storage as Torch.FFI.TH.Double.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Double.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Double.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Double.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Double.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Double.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Floating as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Blas as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Math.Lapack as Torch.FFI.TH.Double.TensorLapack, Torch.Sig.NN as Torch.FFI.TH.NN.Double, Torch.Sig.Types.NN as Torch.Types.TH, Torch.Sig.Tensor.Math.Random.TH as Torch.FFI.TH.Double.TensorMath, Torch.Sig.Tensor.Random.TH as Torch.FFI.TH.Double.TensorRandom, Torch.Sig.Tensor.Random.THC as Torch.Undefined.Double.Tensor.Random.THC)+ + if flag(lite)+ else+ exposed-modules:+ Torch.Byte+ Torch.Byte.Dynamic+ Torch.Byte.Storage+ Torch.Char+ Torch.Char.Dynamic+ Torch.Char.Storage+ Torch.Short+ Torch.Short.Dynamic+ Torch.Short.Storage+ Torch.Int+ Torch.Int.Dynamic+ Torch.Int.Storage+ Torch.Float+ Torch.Float.Dynamic+ Torch.Float.Storage+ build-depends:+ hasktorch-indef-unsigned -any+ mixins: hasktorch-indef-unsigned (Torch.Indef.Storage as Torch.Indef.Byte.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Byte.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Byte.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Byte.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Byte.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Byte.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Byte.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Byte.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Byte.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Byte.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Byte.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Byte.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Byte.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Byte.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Byte.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Byte.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Byte.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Byte.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Byte.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Byte.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Byte.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Byte.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Byte.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Byte.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Byte.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Byte.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Byte.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Byte.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Byte.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Byte.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Byte.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Byte.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Byte.Types, Torch.Indef.Index as Torch.Byte.Index, Torch.Indef.Mask as Torch.Byte.Mask) requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Byte, Torch.Sig.Storage as Torch.FFI.TH.Byte.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Byte.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Byte.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Byte.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Byte.TensorMath),+ hasktorch-indef-unsigned (Torch.Indef.Storage as Torch.Indef.Char.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Char.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Char.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Char.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Char.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Char.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Char.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Char.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Char.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Char.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Char.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Char.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Char.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Char.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Char.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Char.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Char.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Char.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Char.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Char.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Char.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Char.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Char.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Char.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Char.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Char.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Char.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Char.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Char.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Char.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Char.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Char.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Char.Types, Torch.Indef.Index as Torch.Char.Index, Torch.Indef.Mask as Torch.Char.Mask) requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Char, Torch.Sig.Storage as Torch.FFI.TH.Char.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Char.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Char.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Char.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Char.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Char.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Char.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Char.TensorMath),+ hasktorch-indef-signed (Torch.Indef.Storage as Torch.Indef.Short.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Short.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Short.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Short.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Short.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Short.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Short.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Short.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Short.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Short.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Short.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Short.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Short.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Short.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Short.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Short.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Short.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Short.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Short.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Short.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Short.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Short.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Short.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Short.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Short.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Short.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Short.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Short.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Short.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Short.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Short.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Short.Types, Torch.Indef.Index as Torch.Short.Index, Torch.Indef.Mask as Torch.Short.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Short.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise.Signed) requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Short, Torch.Sig.Storage as Torch.FFI.TH.Short.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Short.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Short.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Short.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Short.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Short.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Short.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Short.TensorMath),+ hasktorch-indef-signed (Torch.Indef.Storage as Torch.Indef.Int.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Int.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Int.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Int.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Int.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Int.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Int.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Int.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Int.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Int.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Int.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Int.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Int.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Int.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Int.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Int.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Int.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Int.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Int.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Int.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Int.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Int.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Int.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Int.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Int.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Int.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Int.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Int.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Int.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Int.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Int.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Int.Types, Torch.Indef.Index as Torch.Int.Index, Torch.Indef.Mask as Torch.Int.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Int.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise.Signed) requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Int, Torch.Sig.Storage as Torch.FFI.TH.Int.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Int.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Int.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Int.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Int.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Int.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Int.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Int.TensorMath),+ hasktorch-indef-floating (Torch.Indef.Storage as Torch.Indef.Float.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Float.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Float.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Float.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Float.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Float.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Float.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Float.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Float.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Float.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Float.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Float.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Float.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Float.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Float.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Float.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Float.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Float.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Float.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Float.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Float.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Float.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Float.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Float.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Float.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Float.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Float.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Float.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Float.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Float.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Float.Types, Torch.Indef.Index as Torch.Float.Index, Torch.Indef.Mask as Torch.Float.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Float.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Blas as Torch.Indef.Float.Dynamic.Tensor.Math.Blas, Torch.Indef.Dynamic.Tensor.Math.Lapack as Torch.Indef.Float.Dynamic.Tensor.Math.Lapack, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating as Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Floating, Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating as Torch.Indef.Float.Dynamic.Tensor.Math.Reduce.Floating, Torch.Indef.Dynamic.Tensor.Math.Floating as Torch.Indef.Float.Dynamic.Tensor.Math.Floating, Torch.Indef.Static.Tensor.Math.Blas as Torch.Indef.Float.Tensor.Math.Blas, Torch.Indef.Static.Tensor.Math.Lapack as Torch.Indef.Float.Tensor.Math.Lapack, Torch.Indef.Static.Tensor.Math.Pointwise.Floating as Torch.Indef.Float.Tensor.Math.Pointwise.Floating, Torch.Indef.Static.Tensor.Math.Reduce.Floating as Torch.Indef.Float.Tensor.Math.Reduce.Floating, Torch.Indef.Static.Tensor.Math.Floating as Torch.Indef.Float.Tensor.Math.Floating, Torch.Indef.Static.Tensor.Random.TH as Torch.Indef.Float.Tensor.Random.TH, Torch.Indef.Static.Tensor.Math.Random.TH as Torch.Indef.Float.Tensor.Math.Random.TH, Torch.Indef.Dynamic.Tensor.Random.TH as Torch.Indef.Float.Dynamic.Tensor.Random.TH, Torch.Indef.Dynamic.Tensor.Math.Random.TH as Torch.Indef.Float.Dynamic.Tensor.Math.Random.TH, Torch.Undefined.Tensor.Random.THC as Torch.Undefined.Float.Tensor.Random.THC, Torch.Indef.Storage as Torch.Indef.Float.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Float.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Float.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Float.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Float.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Float.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Float.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Float.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Float.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Float.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Float.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Float.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Float.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Float.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Float.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Float.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Float.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Float.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Float.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Float.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Float.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Float.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Float.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Float.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Float.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Float.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Float.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Float.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Float.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Float.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Float.Types, Torch.Indef.Index as Torch.Float.Index, Torch.Indef.Mask as Torch.Float.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Float.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.NN as Torch.Float.Dynamic.NN, Torch.Indef.Dynamic.NN.Activation as Torch.Float.Dynamic.NN.Activation, Torch.Indef.Dynamic.NN.Pooling as Torch.Float.Dynamic.NN.Pooling, Torch.Indef.Dynamic.NN.Criterion as Torch.Float.Dynamic.NN.Criterion, Torch.Indef.Static.NN as Torch.Float.NN, Torch.Indef.Static.NN as Torch.Float.NN, Torch.Indef.Static.NN.Activation as Torch.Float.NN.Activation, Torch.Indef.Static.NN.Backprop as Torch.Float.NN.Backprop, Torch.Indef.Static.NN.Conv1d as Torch.Float.NN.Conv1d, Torch.Indef.Static.NN.Conv2d as Torch.Float.NN.Conv2d, Torch.Indef.Static.NN.Criterion as Torch.Float.NN.Criterion, Torch.Indef.Static.NN.Layers as Torch.Float.NN.Layers, Torch.Indef.Static.NN.Linear as Torch.Float.NN.Linear, Torch.Indef.Static.NN.Math as Torch.Float.NN.Math, Torch.Indef.Static.NN.Padding as Torch.Float.NN.Padding, Torch.Indef.Static.NN.Pooling as Torch.Float.NN.Pooling, Torch.Indef.Static.NN.Sampling as Torch.Float.NN.Sampling) requires (Torch.Sig.Index.Tensor as Torch.FFI.TH.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.TH.Long.FreeTensor, Torch.Sig.Mask.Tensor as Torch.FFI.TH.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.TH.Byte.FreeTensor, Torch.Sig.Mask.MathReduce as Torch.FFI.TH.Byte.TensorMath, Torch.Sig.State as Torch.Types.TH, Torch.Sig.Types.Global as Torch.Types.TH, Torch.Sig.Types as Torch.Types.TH.Float, Torch.Sig.Storage as Torch.FFI.TH.Float.Storage, Torch.Sig.Storage.Copy as Torch.FFI.TH.Float.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.TH.Float.FreeStorage, Torch.Sig.Tensor as Torch.FFI.TH.Float.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.TH.Float.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.TH.Float.FreeTensor, Torch.Sig.Tensor.Index as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Masked as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Scan as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Mode as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.ScatterGather as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Sort as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.TopK as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Floating as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Blas as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Math.Lapack as Torch.FFI.TH.Float.TensorLapack, Torch.Sig.NN as Torch.FFI.TH.NN.Float, Torch.Sig.Types.NN as Torch.Types.TH, Torch.Sig.Tensor.Math.Random.TH as Torch.FFI.TH.Float.TensorMath, Torch.Sig.Tensor.Random.TH as Torch.FFI.TH.Float.TensorRandom, Torch.Sig.Tensor.Random.THC as Torch.Undefined.Float.Tensor.Random.THC)++library hasktorch-gpu+ exposed-modules:+ Torch.Cuda.Long+ Torch.Cuda.Long.Dynamic+ Torch.Cuda.Long.Storage+ Torch.Cuda.Double+ Torch.Cuda.Double.Dynamic+ Torch.Cuda.Double.Storage+ reexported-modules: Torch.Cuda.Double.NN,+ Torch.Cuda.Double.NN.Activation,+ Torch.Cuda.Double.NN.Backprop,+ Torch.Cuda.Double.NN.Conv1d,+ Torch.Cuda.Double.NN.Conv2d,+ Torch.Cuda.Double.NN.Criterion,+ Torch.Cuda.Double.NN.Layers,+ Torch.Cuda.Double.NN.Linear,+ Torch.Cuda.Double.NN.Math,+ Torch.Cuda.Double.NN.Padding,+ Torch.Cuda.Double.NN.Pooling,+ Torch.Cuda.Double.NN.Sampling,+ Torch.Cuda.Double.Dynamic.NN,+ Torch.Cuda.Double.Dynamic.NN.Activation,+ Torch.Cuda.Double.Dynamic.NN.Pooling,+ Torch.Cuda.Double.Dynamic.NN.Criterion+ cpp-options: -DCUDA -DHASKTORCH_INTERNAL_CUDA+ hs-source-dirs: utils src+ other-modules:+ Torch.Core.Exceptions+ Torch.Core.Random+ Torch.Core.LogAdd+ default-language: Haskell2010+ default-extensions: LambdaCase DataKinds TypeFamilies+ TypeSynonymInstances ScopedTypeVariables FlexibleContexts CPP+ build-depends:+ base (==4.7 || >4.7) && <5,+ hasktorch-types-th (==0.0.1 || >0.0.1) && <0.0.2,+ -- containers ==0.5.10 || >0.5.10,+ -- deepseq ==1.3.0 || >1.3.0,+ dimensions ==1.0 || >1.0,+ hasktorch-ffi-th (==0.0.1 || >0.0.1) && <0.0.2,+ hasktorch-types-th (==0.0.1 || >0.0.1) && <0.0.2,+ -- managed (==1.0.0 || >1.0.0) && <1.1,+ -- microlens ==0.4.8 || >0.4.8,+ -- numeric-limits ==0.1.0 || >0.1.0,+ safe-exceptions ==0.1.0 || >0.1.0,+ singletons ==2.2 || >2.2,+ text ==1.2.2 || >1.2.2,+ -- typelits-witnesses ==0.2.3 || >0.2.3,+ hasktorch-indef-floating -any,+ hasktorch-indef-signed -any,+ hasktorch-ffi-thc (==0.0.1 || >0.0.1) && <0.0.2,+ hasktorch-types-thc (==0.0.1 || >0.0.1) && <0.0.2+ mixins: hasktorch-indef-signed (Torch.Indef.Storage as Torch.Indef.Cuda.Long.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Cuda.Long.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Cuda.Long.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Cuda.Long.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Cuda.Long.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Cuda.Long.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Cuda.Long.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Cuda.Long.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Cuda.Long.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Cuda.Long.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Cuda.Long.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Cuda.Long.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Cuda.Long.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Cuda.Long.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Cuda.Long.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Cuda.Long.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Cuda.Long.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Cuda.Long.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Cuda.Long.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Cuda.Long.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Cuda.Long.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Cuda.Long.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Cuda.Long.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Cuda.Long.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Cuda.Long.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Cuda.Long.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Cuda.Long.Types, Torch.Indef.Index as Torch.Cuda.Long.Index, Torch.Indef.Mask as Torch.Cuda.Long.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Long.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise.Signed) requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Long, Torch.Sig.Storage as Torch.FFI.THC.Long.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Long.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Long.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Long.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Long.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Long.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Long.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Long.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Long.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Long.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Long.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Long.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Long.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Long.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Long.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Long.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Long.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Long.TensorTopK, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.THC.Long.TensorMathPointwise),+ hasktorch-indef-floating (Torch.Indef.Storage as Torch.Indef.Cuda.Double.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Cuda.Double.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Cuda.Double.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Cuda.Double.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Cuda.Double.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Cuda.Double.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Cuda.Double.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Cuda.Double.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Cuda.Double.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Cuda.Double.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Cuda.Double.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Cuda.Double.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Cuda.Double.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Cuda.Double.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Cuda.Double.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Cuda.Double.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Cuda.Double.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Cuda.Double.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Cuda.Double.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Cuda.Double.Types, Torch.Indef.Index as Torch.Cuda.Double.Index, Torch.Indef.Mask as Torch.Cuda.Double.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Blas as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Blas, Torch.Indef.Dynamic.Tensor.Math.Lapack as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Lapack, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Floating, Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce.Floating, Torch.Indef.Dynamic.Tensor.Math.Floating as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Floating, Torch.Indef.Static.Tensor.Math.Blas as Torch.Indef.Cuda.Double.Tensor.Math.Blas, Torch.Indef.Static.Tensor.Math.Lapack as Torch.Indef.Cuda.Double.Tensor.Math.Lapack, Torch.Indef.Static.Tensor.Math.Pointwise.Floating as Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Floating, Torch.Indef.Static.Tensor.Math.Reduce.Floating as Torch.Indef.Cuda.Double.Tensor.Math.Reduce.Floating, Torch.Indef.Static.Tensor.Math.Floating as Torch.Indef.Cuda.Double.Tensor.Math.Floating, Torch.Undefined.Tensor.Random.TH as Torch.Undefined.Cuda.Double.Tensor.Random.TH, Torch.Undefined.Tensor.Math.Random.TH as Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH, Torch.Indef.Static.Tensor.Random.THC as Torch.Indef.Cuda.Double.Tensor.Random.THC, Torch.Indef.Dynamic.Tensor.Random.THC as Torch.Indef.Cuda.Double.Dynamic.Tensor.Random.THC, Torch.Indef.Storage as Torch.Indef.Cuda.Double.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Cuda.Double.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Cuda.Double.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Cuda.Double.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Cuda.Double.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Cuda.Double.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Cuda.Double.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Cuda.Double.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Cuda.Double.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Cuda.Double.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Cuda.Double.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Cuda.Double.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Cuda.Double.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Cuda.Double.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Cuda.Double.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Cuda.Double.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Cuda.Double.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Cuda.Double.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Cuda.Double.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Cuda.Double.Types, Torch.Indef.Index as Torch.Cuda.Double.Index, Torch.Indef.Mask as Torch.Cuda.Double.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.NN as Torch.Cuda.Double.Dynamic.NN, Torch.Indef.Dynamic.NN.Activation as Torch.Cuda.Double.Dynamic.NN.Activation, Torch.Indef.Dynamic.NN.Pooling as Torch.Cuda.Double.Dynamic.NN.Pooling, Torch.Indef.Dynamic.NN.Criterion as Torch.Cuda.Double.Dynamic.NN.Criterion, Torch.Indef.Static.NN as Torch.Cuda.Double.NN, Torch.Indef.Static.NN as Torch.Cuda.Double.NN, Torch.Indef.Static.NN.Activation as Torch.Cuda.Double.NN.Activation, Torch.Indef.Static.NN.Backprop as Torch.Cuda.Double.NN.Backprop, Torch.Indef.Static.NN.Conv1d as Torch.Cuda.Double.NN.Conv1d, Torch.Indef.Static.NN.Conv2d as Torch.Cuda.Double.NN.Conv2d, Torch.Indef.Static.NN.Criterion as Torch.Cuda.Double.NN.Criterion, Torch.Indef.Static.NN.Layers as Torch.Cuda.Double.NN.Layers, Torch.Indef.Static.NN.Linear as Torch.Cuda.Double.NN.Linear, Torch.Indef.Static.NN.Math as Torch.Cuda.Double.NN.Math, Torch.Indef.Static.NN.Padding as Torch.Cuda.Double.NN.Padding, Torch.Indef.Static.NN.Pooling as Torch.Cuda.Double.NN.Pooling, Torch.Indef.Static.NN.Sampling as Torch.Cuda.Double.NN.Sampling) requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Double, Torch.Sig.Storage as Torch.FFI.THC.Double.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Double.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Double.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Double.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Double.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Double.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Double.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Double.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Double.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Double.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Double.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Double.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Double.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Double.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Double.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Double.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Double.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Double.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Double.TensorTopK, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.THC.Double.TensorMathPointwise, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.FFI.THC.Double.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.FFI.THC.Double.TensorMathReduce, Torch.Sig.Tensor.Math.Floating as Torch.FFI.THC.Double.TensorMath, Torch.Sig.Tensor.Math.Blas as Torch.FFI.THC.Double.TensorMathBlas, Torch.Sig.Tensor.Math.Lapack as Torch.FFI.THC.Double.TensorMathMagma, Torch.Sig.NN as Torch.FFI.THC.NN.Double, Torch.Sig.Types.NN as Torch.Types.THC, Torch.Sig.Tensor.Math.Random.TH as Torch.Undefined.Cuda.Double.Tensor.Math.Random.TH, Torch.Sig.Tensor.Random.TH as Torch.Undefined.Cuda.Double.Tensor.Random.TH, Torch.Sig.Tensor.Random.THC as Torch.FFI.THC.Double.TensorRandom)+ + if flag(lite)+ else+ exposed-modules:+ Torch.Cuda.Byte+ Torch.Cuda.Byte.Dynamic+ Torch.Cuda.Byte.Storage+ Torch.Cuda.Char+ Torch.Cuda.Char.Dynamic+ Torch.Cuda.Char.Storage+ Torch.Cuda.Short+ Torch.Cuda.Short.Dynamic+ Torch.Cuda.Short.Storage+ Torch.Cuda.Int+ Torch.Cuda.Int.Dynamic+ Torch.Cuda.Int.Storage+ build-depends:+ hasktorch-indef-unsigned -any+ mixins: hasktorch-indef-unsigned (Torch.Indef.Storage as Torch.Indef.Cuda.Byte.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Cuda.Byte.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Cuda.Byte.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Cuda.Byte.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Cuda.Byte.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Cuda.Byte.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Cuda.Byte.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Cuda.Byte.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Cuda.Byte.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Cuda.Byte.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Cuda.Byte.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Cuda.Byte.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Cuda.Byte.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Cuda.Byte.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Cuda.Byte.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Cuda.Byte.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Cuda.Byte.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Cuda.Byte.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Cuda.Byte.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Cuda.Byte.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Cuda.Byte.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Cuda.Byte.Types, Torch.Indef.Index as Torch.Cuda.Byte.Index, Torch.Indef.Mask as Torch.Cuda.Byte.Mask) requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Byte, Torch.Sig.Storage as Torch.FFI.THC.Byte.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Byte.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Byte.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Byte.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Byte.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Byte.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Byte.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Byte.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Byte.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Byte.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Byte.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Byte.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Byte.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Byte.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Byte.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Byte.TensorTopK),+ hasktorch-indef-unsigned (Torch.Indef.Storage as Torch.Indef.Cuda.Char.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Cuda.Char.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Cuda.Char.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Cuda.Char.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Cuda.Char.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Cuda.Char.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Cuda.Char.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Cuda.Char.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Cuda.Char.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Cuda.Char.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Cuda.Char.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Cuda.Char.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Cuda.Char.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Cuda.Char.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Cuda.Char.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Cuda.Char.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Cuda.Char.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Cuda.Char.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Cuda.Char.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Cuda.Char.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Cuda.Char.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Cuda.Char.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Cuda.Char.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Cuda.Char.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Cuda.Char.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Cuda.Char.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Cuda.Char.Types, Torch.Indef.Index as Torch.Cuda.Char.Index, Torch.Indef.Mask as Torch.Cuda.Char.Mask) requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Char, Torch.Sig.Storage as Torch.FFI.THC.Char.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Char.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Char.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Char.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Char.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Char.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Char.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Char.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Char.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Char.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Char.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Char.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Char.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Char.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Char.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Char.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Char.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Char.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Char.TensorTopK),+ hasktorch-indef-signed (Torch.Indef.Storage as Torch.Indef.Cuda.Short.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Cuda.Short.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Cuda.Short.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Cuda.Short.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Cuda.Short.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Cuda.Short.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Cuda.Short.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Cuda.Short.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Cuda.Short.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Cuda.Short.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Cuda.Short.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Cuda.Short.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Cuda.Short.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Cuda.Short.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Cuda.Short.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Cuda.Short.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Cuda.Short.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Cuda.Short.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Cuda.Short.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Cuda.Short.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Cuda.Short.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Cuda.Short.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Cuda.Short.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Cuda.Short.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Cuda.Short.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Cuda.Short.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Cuda.Short.Types, Torch.Indef.Index as Torch.Cuda.Short.Index, Torch.Indef.Mask as Torch.Cuda.Short.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Short.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise.Signed) requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Short, Torch.Sig.Storage as Torch.FFI.THC.Short.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Short.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Short.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Short.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Short.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Short.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Short.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Short.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Short.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Short.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Short.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Short.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Short.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Short.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Short.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Short.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Short.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Short.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Short.TensorTopK, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.THC.Short.TensorMathPointwise),+ hasktorch-indef-signed (Torch.Indef.Storage as Torch.Indef.Cuda.Int.Storage, Torch.Indef.Storage.Copy as Torch.Indef.Cuda.Int.Storage.Copy, Torch.Indef.Static.Tensor as Torch.Indef.Cuda.Int.Tensor, Torch.Indef.Static.Tensor.Copy as Torch.Indef.Cuda.Int.Tensor.Copy, Torch.Indef.Static.Tensor.Index as Torch.Indef.Cuda.Int.Tensor.Index, Torch.Indef.Static.Tensor.Masked as Torch.Indef.Cuda.Int.Tensor.Masked, Torch.Indef.Static.Tensor.Math as Torch.Indef.Cuda.Int.Tensor.Math, Torch.Indef.Static.Tensor.Math.Compare as Torch.Indef.Cuda.Int.Tensor.Math.Compare, Torch.Indef.Static.Tensor.Math.CompareT as Torch.Indef.Cuda.Int.Tensor.Math.CompareT, Torch.Indef.Static.Tensor.Math.Pairwise as Torch.Indef.Cuda.Int.Tensor.Math.Pairwise, Torch.Indef.Static.Tensor.Math.Pointwise as Torch.Indef.Cuda.Int.Tensor.Math.Pointwise, Torch.Indef.Static.Tensor.Math.Reduce as Torch.Indef.Cuda.Int.Tensor.Math.Reduce, Torch.Indef.Static.Tensor.Math.Scan as Torch.Indef.Cuda.Int.Tensor.Math.Scan, Torch.Indef.Static.Tensor.Mode as Torch.Indef.Cuda.Int.Tensor.Mode, Torch.Indef.Static.Tensor.ScatterGather as Torch.Indef.Cuda.Int.Tensor.ScatterGather, Torch.Indef.Static.Tensor.Sort as Torch.Indef.Cuda.Int.Tensor.Sort, Torch.Indef.Static.Tensor.TopK as Torch.Indef.Cuda.Int.Tensor.TopK, Torch.Indef.Dynamic.Tensor as Torch.Indef.Cuda.Int.Dynamic.Tensor, Torch.Indef.Dynamic.Tensor.Copy as Torch.Indef.Cuda.Int.Dynamic.Tensor.Copy, Torch.Indef.Dynamic.Tensor.Index as Torch.Indef.Cuda.Int.Dynamic.Tensor.Index, Torch.Indef.Dynamic.Tensor.Masked as Torch.Indef.Cuda.Int.Dynamic.Tensor.Masked, Torch.Indef.Dynamic.Tensor.Math as Torch.Indef.Cuda.Int.Dynamic.Tensor.Math, Torch.Indef.Dynamic.Tensor.Math.Compare as Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Compare, Torch.Indef.Dynamic.Tensor.Math.CompareT as Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.CompareT, Torch.Indef.Dynamic.Tensor.Math.Pairwise as Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pairwise, Torch.Indef.Dynamic.Tensor.Math.Pointwise as Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise, Torch.Indef.Dynamic.Tensor.Math.Reduce as Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Reduce, Torch.Indef.Dynamic.Tensor.Math.Scan as Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Scan, Torch.Indef.Dynamic.Tensor.Mode as Torch.Indef.Cuda.Int.Dynamic.Tensor.Mode, Torch.Indef.Dynamic.Tensor.ScatterGather as Torch.Indef.Cuda.Int.Dynamic.Tensor.ScatterGather, Torch.Indef.Dynamic.Tensor.Sort as Torch.Indef.Cuda.Int.Dynamic.Tensor.Sort, Torch.Indef.Dynamic.Tensor.TopK as Torch.Indef.Cuda.Int.Dynamic.Tensor.TopK, Torch.Indef.Types as Torch.Cuda.Int.Types, Torch.Indef.Index as Torch.Cuda.Int.Index, Torch.Indef.Mask as Torch.Cuda.Int.Mask, Torch.Indef.Static.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Int.Tensor.Math.Pointwise.Signed, Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed as Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise.Signed) requires (Torch.Sig.Index.Tensor as Torch.FFI.THC.Long.Tensor, Torch.Sig.Index.TensorFree as Torch.FFI.THC.Long.Tensor, Torch.Sig.Mask.Tensor as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.TensorFree as Torch.FFI.THC.Byte.Tensor, Torch.Sig.Mask.MathReduce as Torch.FFI.THC.Byte.TensorMathReduce, Torch.Sig.State as Torch.FFI.THC.State, Torch.Sig.Types.Global as Torch.Types.THC, Torch.Sig.Types as Torch.Types.THC.Int, Torch.Sig.Storage as Torch.FFI.THC.Int.Storage, Torch.Sig.Storage.Copy as Torch.FFI.THC.Int.StorageCopy, Torch.Sig.Storage.Memory as Torch.FFI.THC.Int.Storage, Torch.Sig.Tensor as Torch.FFI.THC.Int.Tensor, Torch.Sig.Tensor.Copy as Torch.FFI.THC.Int.TensorCopy, Torch.Sig.Tensor.Memory as Torch.FFI.THC.Int.Tensor, Torch.Sig.Tensor.Index as Torch.FFI.THC.Int.TensorIndex, Torch.Sig.Tensor.Masked as Torch.FFI.THC.Int.TensorMasked, Torch.Sig.Tensor.Math as Torch.FFI.THC.Int.TensorMath, Torch.Sig.Tensor.Math.Compare as Torch.FFI.THC.Int.TensorMathCompare, Torch.Sig.Tensor.Math.CompareT as Torch.FFI.THC.Int.TensorMathCompareT, Torch.Sig.Tensor.Math.Pairwise as Torch.FFI.THC.Int.TensorMathPairwise, Torch.Sig.Tensor.Math.Pointwise as Torch.FFI.THC.Int.TensorMathPointwise, Torch.Sig.Tensor.Math.Reduce as Torch.FFI.THC.Int.TensorMathReduce, Torch.Sig.Tensor.Math.Scan as Torch.FFI.THC.Int.TensorMathScan, Torch.Sig.Tensor.Mode as Torch.FFI.THC.Int.TensorMode, Torch.Sig.Tensor.ScatterGather as Torch.FFI.THC.Int.TensorScatterGather, Torch.Sig.Tensor.Sort as Torch.FFI.THC.Int.TensorSort, Torch.Sig.Tensor.TopK as Torch.FFI.THC.Int.TensorTopK, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.FFI.THC.Int.TensorMathPointwise)++library hasktorch-indef-unsigned+ reexported-modules: Torch.Indef.Index,+ Torch.Indef.Mask,+ Torch.Indef.Types,+ Torch.Indef.Storage,+ Torch.Indef.Storage.Copy,+ Torch.Indef.Dynamic.Print,+ Torch.Indef.Dynamic.Tensor,+ Torch.Indef.Dynamic.Tensor.Copy,+ Torch.Indef.Dynamic.Tensor.Index,+ Torch.Indef.Dynamic.Tensor.Masked,+ Torch.Indef.Dynamic.Tensor.Math,+ Torch.Indef.Dynamic.Tensor.Math.Compare,+ Torch.Indef.Dynamic.Tensor.Math.CompareT,+ Torch.Indef.Dynamic.Tensor.Math.Pairwise,+ Torch.Indef.Dynamic.Tensor.Math.Pointwise,+ Torch.Indef.Dynamic.Tensor.Math.Reduce,+ Torch.Indef.Dynamic.Tensor.Math.Scan,+ Torch.Indef.Dynamic.Tensor.Mode,+ Torch.Indef.Dynamic.Tensor.ScatterGather,+ Torch.Indef.Dynamic.Tensor.Sort,+ Torch.Indef.Dynamic.Tensor.TopK,+ Torch.Indef.Static.Tensor,+ Torch.Indef.Static.Tensor.Copy,+ Torch.Indef.Static.Tensor.Index,+ Torch.Indef.Static.Tensor.Masked,+ Torch.Indef.Static.Tensor.Math,+ Torch.Indef.Static.Tensor.Math.Compare,+ Torch.Indef.Static.Tensor.Math.CompareT,+ Torch.Indef.Static.Tensor.Math.Pairwise,+ Torch.Indef.Static.Tensor.Math.Pointwise,+ Torch.Indef.Static.Tensor.Math.Reduce,+ Torch.Indef.Static.Tensor.Math.Scan,+ Torch.Indef.Static.Tensor.Mode,+ Torch.Indef.Static.Tensor.ScatterGather,+ Torch.Indef.Static.Tensor.Sort,+ Torch.Indef.Static.Tensor.TopK+ default-language: Haskell2010+ build-depends:+ base (==4.7 || >4.7) && <5,+ hasktorch-signatures-partial (==0.0.1 || >0.0.1) && <0.0.2,+ hasktorch-indef -any+ mixins: hasktorch-indef requires (Torch.Sig.NN as Torch.Undefined.NN, Torch.Sig.Types.NN as Torch.Undefined.Types.NN, Torch.Sig.Tensor.Math.Blas as Torch.Undefined.Tensor.Math.Blas, Torch.Sig.Tensor.Math.Floating as Torch.Undefined.Tensor.Math.Floating, Torch.Sig.Tensor.Math.Lapack as Torch.Undefined.Tensor.Math.Lapack, Torch.Sig.Tensor.Math.Pointwise.Signed as Torch.Undefined.Tensor.Math.Pointwise.Signed, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.Undefined.Tensor.Math.Pointwise.Floating, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.Undefined.Tensor.Math.Reduce.Floating, Torch.Sig.Tensor.Math.Random.TH as Torch.Undefined.Tensor.Math.Random.TH, Torch.Sig.Tensor.Random.TH as Torch.Undefined.Tensor.Random.TH, Torch.Sig.Tensor.Random.THC as Torch.Undefined.Tensor.Random.THC)++library hasktorch-indef-signed+ reexported-modules: Torch.Indef.Index,+ Torch.Indef.Mask,+ Torch.Indef.Types,+ Torch.Indef.Storage,+ Torch.Indef.Storage.Copy,+ Torch.Indef.Dynamic.Print,+ Torch.Indef.Dynamic.Tensor,+ Torch.Indef.Dynamic.Tensor.Copy,+ Torch.Indef.Dynamic.Tensor.Index,+ Torch.Indef.Dynamic.Tensor.Masked,+ Torch.Indef.Dynamic.Tensor.Math,+ Torch.Indef.Dynamic.Tensor.Math.Compare,+ Torch.Indef.Dynamic.Tensor.Math.CompareT,+ Torch.Indef.Dynamic.Tensor.Math.Pairwise,+ Torch.Indef.Dynamic.Tensor.Math.Pointwise,+ Torch.Indef.Dynamic.Tensor.Math.Reduce,+ Torch.Indef.Dynamic.Tensor.Math.Scan,+ Torch.Indef.Dynamic.Tensor.Mode,+ Torch.Indef.Dynamic.Tensor.ScatterGather,+ Torch.Indef.Dynamic.Tensor.Sort,+ Torch.Indef.Dynamic.Tensor.TopK,+ Torch.Indef.Static.Tensor,+ Torch.Indef.Static.Tensor.Copy,+ Torch.Indef.Static.Tensor.Index,+ Torch.Indef.Static.Tensor.Masked,+ Torch.Indef.Static.Tensor.Math,+ Torch.Indef.Static.Tensor.Math.Compare,+ Torch.Indef.Static.Tensor.Math.CompareT,+ Torch.Indef.Static.Tensor.Math.Pairwise,+ Torch.Indef.Static.Tensor.Math.Pointwise,+ Torch.Indef.Static.Tensor.Math.Reduce,+ Torch.Indef.Static.Tensor.Math.Scan,+ Torch.Indef.Static.Tensor.Mode,+ Torch.Indef.Static.Tensor.ScatterGather,+ Torch.Indef.Static.Tensor.Sort,+ Torch.Indef.Static.Tensor.TopK,+ Torch.Indef.Static.Tensor.Math.Pointwise.Signed,+ Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed+ default-language: Haskell2010+ build-depends:+ base (==4.7 || >4.7) && <5,+ hasktorch-signatures-partial (==0.0.1 || >0.0.1) && <0.0.2,+ hasktorch-indef -any+ mixins: hasktorch-indef requires (Torch.Sig.NN as Torch.Undefined.NN, Torch.Sig.Types.NN as Torch.Undefined.Types.NN, Torch.Sig.Tensor.Math.Blas as Torch.Undefined.Tensor.Math.Blas, Torch.Sig.Tensor.Math.Floating as Torch.Undefined.Tensor.Math.Floating, Torch.Sig.Tensor.Math.Lapack as Torch.Undefined.Tensor.Math.Lapack, Torch.Sig.Tensor.Math.Pointwise.Floating as Torch.Undefined.Tensor.Math.Pointwise.Floating, Torch.Sig.Tensor.Math.Reduce.Floating as Torch.Undefined.Tensor.Math.Reduce.Floating, Torch.Sig.Tensor.Math.Random.TH as Torch.Undefined.Tensor.Math.Random.TH, Torch.Sig.Tensor.Random.TH as Torch.Undefined.Tensor.Random.TH, Torch.Sig.Tensor.Random.THC as Torch.Undefined.Tensor.Random.THC)++library hasktorch-indef-floating+ reexported-modules: Torch.Indef.Index,+ Torch.Indef.Mask,+ Torch.Indef.Types,+ Torch.Indef.Storage,+ Torch.Indef.Storage.Copy,+ Torch.Indef.Dynamic.Print,+ Torch.Indef.Dynamic.Tensor,+ Torch.Indef.Dynamic.Tensor.Copy,+ Torch.Indef.Dynamic.Tensor.Index,+ Torch.Indef.Dynamic.Tensor.Masked,+ Torch.Indef.Dynamic.Tensor.Math,+ Torch.Indef.Dynamic.Tensor.Math.Compare,+ Torch.Indef.Dynamic.Tensor.Math.CompareT,+ Torch.Indef.Dynamic.Tensor.Math.Pairwise,+ Torch.Indef.Dynamic.Tensor.Math.Pointwise,+ Torch.Indef.Dynamic.Tensor.Math.Reduce,+ Torch.Indef.Dynamic.Tensor.Math.Scan,+ Torch.Indef.Dynamic.Tensor.Mode,+ Torch.Indef.Dynamic.Tensor.ScatterGather,+ Torch.Indef.Dynamic.Tensor.Sort,+ Torch.Indef.Dynamic.Tensor.TopK,+ Torch.Indef.Static.Tensor,+ Torch.Indef.Static.Tensor.Copy,+ Torch.Indef.Static.Tensor.Index,+ Torch.Indef.Static.Tensor.Masked,+ Torch.Indef.Static.Tensor.Math,+ Torch.Indef.Static.Tensor.Math.Compare,+ Torch.Indef.Static.Tensor.Math.CompareT,+ Torch.Indef.Static.Tensor.Math.Pairwise,+ Torch.Indef.Static.Tensor.Math.Pointwise,+ Torch.Indef.Static.Tensor.Math.Reduce,+ Torch.Indef.Static.Tensor.Math.Scan,+ Torch.Indef.Static.Tensor.Mode,+ Torch.Indef.Static.Tensor.ScatterGather,+ Torch.Indef.Static.Tensor.Sort,+ Torch.Indef.Static.Tensor.TopK,+ Torch.Indef.Static.Tensor.Math.Pointwise.Signed,+ Torch.Indef.Dynamic.Tensor.Math.Pointwise.Signed,+ Torch.Indef.Dynamic.Tensor.Math.Blas,+ Torch.Indef.Dynamic.Tensor.Math.Floating,+ Torch.Indef.Dynamic.Tensor.Math.Lapack,+ Torch.Indef.Dynamic.Tensor.Math.Pointwise.Floating,+ Torch.Indef.Dynamic.Tensor.Math.Reduce.Floating,+ Torch.Indef.Dynamic.Tensor.Random.TH,+ Torch.Indef.Dynamic.Tensor.Random.THC,+ Torch.Indef.Dynamic.Tensor.Math.Random.TH,+ Torch.Indef.Static.Tensor.Math.Blas,+ Torch.Indef.Static.Tensor.Math.Floating,+ Torch.Indef.Static.Tensor.Math.Lapack,+ Torch.Indef.Static.Tensor.Math.Pointwise.Floating,+ Torch.Indef.Static.Tensor.Math.Reduce.Floating,+ Torch.Indef.Static.Tensor.Random.TH,+ Torch.Indef.Static.Tensor.Random.THC,+ Torch.Indef.Static.Tensor.Math.Random.TH,+ Torch.Indef.Dynamic.NN,+ Torch.Indef.Dynamic.NN.Activation,+ Torch.Indef.Dynamic.NN.Pooling,+ Torch.Indef.Dynamic.NN.Criterion,+ Torch.Indef.Static.NN,+ Torch.Indef.Static.NN.Activation,+ Torch.Indef.Static.NN.Backprop,+ Torch.Indef.Static.NN.Conv1d,+ Torch.Indef.Static.NN.Conv2d,+ Torch.Indef.Static.NN.Criterion,+ Torch.Indef.Static.NN.Layers,+ Torch.Indef.Static.NN.Linear,+ Torch.Indef.Static.NN.Math,+ Torch.Indef.Static.NN.Padding,+ Torch.Indef.Static.NN.Pooling,+ Torch.Indef.Static.NN.Sampling,+ Torch.Undefined.Tensor.Math.Random.TH,+ Torch.Undefined.Tensor.Random.TH,+ Torch.Undefined.Tensor.Random.THC+ default-language: Haskell2010+ build-depends:+ base (==4.7 || >4.7) && <5,+ hasktorch-indef -any,+ hasktorch-signatures-partial (==0.0.1 || >0.0.1) && <0.0.2++executable isdefinite-cpu+ main-is: Noop.hs+ hs-source-dirs: exe+ default-language: Haskell2010+ build-depends:+ base (==4.7 || >4.7) && <5,+ hasktorch-cpu -any++executable isdefinite-gpu+ main-is: Noop.hs+ hs-source-dirs: exe+ default-language: Haskell2010+ build-depends:+ base (==4.7 || >4.7) && <5,+ hasktorch-gpu -any++executable isdefinite+ main-is: Noop.hs+ hs-source-dirs: exe+ default-language: Haskell2010+ build-depends:+ base (==4.7 || >4.7) && <5,+ hasktorch -any++executable memcheck+ main-is: Memcheck.hs+ hs-source-dirs: exe+ default-language: Haskell2010+ build-depends:+ base (==4.7 || >4.7) && <5,+ hasktorch -any++test-suite spec+ type: exitcode-stdio-1.0+ main-is: Spec.hs+ hs-source-dirs: tests+ other-modules:+ Orphans+ MemorySpec+ RawLapackSVDSpec+ GarbageCollectionSpec+ Torch.Prelude.Extras+ Torch.Core.LogAddSpec+ Torch.Core.RandomSpec+ Torch.Static.NN.AbsSpec+ Torch.Static.NN.LinearSpec+ default-language: Haskell2010+ default-extensions: LambdaCase DataKinds TypeFamilies+ TypeSynonymInstances ScopedTypeVariables FlexibleContexts CPP+ build-depends:+ QuickCheck ==2.11 || >2.11,+ backprop ==0.2.5 || >0.2.5,+ base (==4.7 || >4.7) && <5,+ dimensions ==1.0 || >1.0,+ ghc-typelits-natnormalise -any,+ hasktorch -any,+ hspec ==2.4.4 || >2.4.4,+ singletons ==2.2 || >2.2,+ -- text ==1.2.2 || >1.2.2,+ mtl ==2.2.2 || >2.2.2,+ microlens-platform ==0.3.10 || >0.3.10,+ monad-loops ==0.4.3 || >0.4.3,+ time ==1.8.0 || >1.8.0,+ transformers ==0.5.5 || >0.5.5,+ generic-lens -any+
+ src/Torch/Byte.hs view
@@ -0,0 +1,29 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Byte+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Byte (module X) where++import Torch.Byte.Index as X+import Torch.Indef.Byte.Tensor as X+import Torch.Indef.Byte.Tensor.Copy as X+import Torch.Indef.Byte.Tensor.Index as X+import Torch.Indef.Byte.Tensor.Masked as X+import Torch.Indef.Byte.Tensor.Math as X+import Torch.Indef.Byte.Tensor.Math.Compare as X+import Torch.Indef.Byte.Tensor.Math.CompareT as X+import Torch.Indef.Byte.Tensor.Math.Pairwise as X+import Torch.Indef.Byte.Tensor.Math.Pointwise as X+import Torch.Indef.Byte.Tensor.Math.Reduce as X+import Torch.Indef.Byte.Tensor.Math.Scan as X+import Torch.Indef.Byte.Tensor.Mode as X+import Torch.Indef.Byte.Tensor.ScatterGather as X+import Torch.Indef.Byte.Tensor.Sort as X+import Torch.Indef.Byte.Tensor.TopK as X++
+ src/Torch/Byte/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Byte.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Byte.Dynamic (module X) where++import Torch.Indef.Byte.Dynamic.Tensor as X+import Torch.Indef.Byte.Dynamic.Tensor.Copy as X+import Torch.Indef.Byte.Dynamic.Tensor.Index as X+import Torch.Indef.Byte.Dynamic.Tensor.Masked as X+import Torch.Indef.Byte.Dynamic.Tensor.Math as X+import Torch.Indef.Byte.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Byte.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Byte.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Byte.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Byte.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Byte.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Byte.Dynamic.Tensor.Mode as X+import Torch.Indef.Byte.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Byte.Dynamic.Tensor.Sort as X+import Torch.Indef.Byte.Dynamic.Tensor.TopK as X++
+ src/Torch/Byte/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Byte.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Byte.Storage (module X) where++import Torch.Indef.Byte.Storage as X+import Torch.Indef.Byte.Storage.Copy as X
+ src/Torch/Char.hs view
@@ -0,0 +1,29 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Char+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Char (module X) where++import Torch.Byte.Index as X+import Torch.Indef.Char.Tensor as X+import Torch.Indef.Char.Tensor.Copy as X+import Torch.Indef.Char.Tensor.Index as X+import Torch.Indef.Char.Tensor.Masked as X+import Torch.Indef.Char.Tensor.Math as X+import Torch.Indef.Char.Tensor.Math.Compare as X+import Torch.Indef.Char.Tensor.Math.CompareT as X+import Torch.Indef.Char.Tensor.Math.Pairwise as X+import Torch.Indef.Char.Tensor.Math.Pointwise as X+import Torch.Indef.Char.Tensor.Math.Reduce as X+import Torch.Indef.Char.Tensor.Math.Scan as X+import Torch.Indef.Char.Tensor.Mode as X+import Torch.Indef.Char.Tensor.ScatterGather as X+import Torch.Indef.Char.Tensor.Sort as X+import Torch.Indef.Char.Tensor.TopK as X++
+ src/Torch/Char/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Char.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Char.Dynamic (module X) where++import Torch.Indef.Char.Dynamic.Tensor as X+import Torch.Indef.Char.Dynamic.Tensor.Copy as X+import Torch.Indef.Char.Dynamic.Tensor.Index as X+import Torch.Indef.Char.Dynamic.Tensor.Masked as X+import Torch.Indef.Char.Dynamic.Tensor.Math as X+import Torch.Indef.Char.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Char.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Char.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Char.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Char.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Char.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Char.Dynamic.Tensor.Mode as X+import Torch.Indef.Char.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Char.Dynamic.Tensor.Sort as X+import Torch.Indef.Char.Dynamic.Tensor.TopK as X++
+ src/Torch/Char/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Char.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Char.Storage (module X) where++import Torch.Indef.Char.Storage as X+import Torch.Indef.Char.Storage.Copy as X
+ src/Torch/Cuda/Byte.hs view
@@ -0,0 +1,29 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Byte+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Byte (module X) where++import Torch.Cuda.Byte.Index as X+import Torch.Indef.Cuda.Byte.Tensor as X+import Torch.Indef.Cuda.Byte.Tensor.Copy as X+import Torch.Indef.Cuda.Byte.Tensor.Index as X+import Torch.Indef.Cuda.Byte.Tensor.Masked as X+import Torch.Indef.Cuda.Byte.Tensor.Math as X+import Torch.Indef.Cuda.Byte.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Byte.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Byte.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Byte.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Byte.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Byte.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Byte.Tensor.Mode as X+import Torch.Indef.Cuda.Byte.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Byte.Tensor.Sort as X+import Torch.Indef.Cuda.Byte.Tensor.TopK as X++
+ src/Torch/Cuda/Byte/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Byte.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Byte.Dynamic (module X) where++import Torch.Indef.Cuda.Byte.Dynamic.Tensor as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Copy as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Index as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Masked as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Mode as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.Sort as X+import Torch.Indef.Cuda.Byte.Dynamic.Tensor.TopK as X++
+ src/Torch/Cuda/Byte/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Byte.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Byte.Storage (module X) where++import Torch.Indef.Cuda.Byte.Storage as X+import Torch.Indef.Cuda.Byte.Storage.Copy as X
+ src/Torch/Cuda/Char.hs view
@@ -0,0 +1,29 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Char+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Char (module X) where++import Torch.Cuda.Char.Index as X+import Torch.Indef.Cuda.Char.Tensor as X+import Torch.Indef.Cuda.Char.Tensor.Copy as X+import Torch.Indef.Cuda.Char.Tensor.Index as X+import Torch.Indef.Cuda.Char.Tensor.Masked as X+import Torch.Indef.Cuda.Char.Tensor.Math as X+import Torch.Indef.Cuda.Char.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Char.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Char.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Char.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Char.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Char.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Char.Tensor.Mode as X+import Torch.Indef.Cuda.Char.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Char.Tensor.Sort as X+import Torch.Indef.Cuda.Char.Tensor.TopK as X++
+ src/Torch/Cuda/Char/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Char.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Char.Dynamic (module X) where++import Torch.Indef.Cuda.Char.Dynamic.Tensor as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Copy as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Index as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Masked as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Math as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Mode as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.Sort as X+import Torch.Indef.Cuda.Char.Dynamic.Tensor.TopK as X++
+ src/Torch/Cuda/Char/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Char.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Char.Storage (module X) where++import Torch.Indef.Cuda.Char.Storage as X+import Torch.Indef.Cuda.Char.Storage.Copy as X
+ src/Torch/Cuda/Double.hs view
@@ -0,0 +1,84 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Double+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+{-# LANGUAGE InstanceSigs #-}+module Torch.Cuda.Double (module X) where++import Numeric.Dimensions as X+import Torch.Types.THC as X+import Torch.Cuda.Double.NN as X++import Torch.Cuda.Double.Types as X hiding (storage)+import Torch.Cuda.Double.Index as X hiding (withDynamicState)+import Torch.Cuda.Double.Mask as X++import Torch.Indef.Cuda.Double.Tensor as X+import Torch.Indef.Cuda.Double.Tensor.Copy as X+import Torch.Indef.Cuda.Double.Tensor.Index as X+import Torch.Indef.Cuda.Double.Tensor.Masked as X+import Torch.Indef.Cuda.Double.Tensor.Math as X+import Torch.Indef.Cuda.Double.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Double.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Double.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Double.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Double.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Double.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Double.Tensor.Mode as X+import Torch.Indef.Cuda.Double.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Double.Tensor.Sort as X+import Torch.Indef.Cuda.Double.Tensor.TopK as X++import Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Signed as X++import Torch.Indef.Cuda.Double.Tensor.Math.Blas as X+import Torch.Indef.Cuda.Double.Tensor.Math.Floating as X+import Torch.Indef.Cuda.Double.Tensor.Math.Lapack as X+import Torch.Indef.Cuda.Double.Tensor.Math.Pointwise.Floating as X+import Torch.Indef.Cuda.Double.Tensor.Math.Reduce.Floating as X++import Torch.Indef.Cuda.Double.Tensor.Random.THC as X++-------------------------------------------------------------------------------++import System.IO.Unsafe++instance Dimensions d => Fractional (Tensor d) where+ fromRational = constant . fromRational++ (/) = (^/^)+ {-# NOINLINE (/) #-}++instance Dimensions d => Floating (Tensor d) where+ pi :: Tensor d+ pi = X.constant pi++ exp :: Tensor d -> Tensor d+ exp = X.exp++ log :: Tensor d -> Tensor d+ log = X.log++ sqrt :: Tensor d -> Tensor d+ sqrt = X.sqrt++ sin = X.sin++ cos = X.cos++ asin = X.asin++ acos = X.acos++ atan = X.atan++ sinh = X.sinh++ cosh = X.cosh++
+ src/Torch/Cuda/Double/Dynamic.hs view
@@ -0,0 +1,28 @@+module Torch.Cuda.Double.Dynamic (module X) where++import Torch.Indef.Cuda.Double.Dynamic.Tensor as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Copy as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Index as X++import Torch.Indef.Cuda.Double.Dynamic.Tensor.Masked as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Mode as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Sort as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.TopK as X++import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Signed as X++import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Blas as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Floating as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Lapack as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Pointwise.Floating as X+import Torch.Indef.Cuda.Double.Dynamic.Tensor.Math.Reduce.Floating as X++
+ src/Torch/Cuda/Double/Storage.hs view
@@ -0,0 +1,4 @@+module Torch.Cuda.Double.Storage (module X) where++import Torch.Indef.Cuda.Double.Storage as X+import Torch.Indef.Cuda.Double.Storage.Copy as X
+ src/Torch/Cuda/Int.hs view
@@ -0,0 +1,29 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Int+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Int (module X) where++import Torch.Cuda.Int.Index as X+import Torch.Indef.Cuda.Int.Tensor as X+import Torch.Indef.Cuda.Int.Tensor.Copy as X+import Torch.Indef.Cuda.Int.Tensor.Index as X+import Torch.Indef.Cuda.Int.Tensor.Masked as X+import Torch.Indef.Cuda.Int.Tensor.Math as X+import Torch.Indef.Cuda.Int.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Int.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Int.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Int.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Int.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Int.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Int.Tensor.Mode as X+import Torch.Indef.Cuda.Int.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Int.Tensor.Sort as X+import Torch.Indef.Cuda.Int.Tensor.TopK as X++import Torch.Indef.Cuda.Int.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Cuda/Int/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Int.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Int.Dynamic (module X) where++import Torch.Indef.Cuda.Int.Dynamic.Tensor as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Copy as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Index as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Masked as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Math as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Mode as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.Sort as X+import Torch.Indef.Cuda.Int.Dynamic.Tensor.TopK as X++import Torch.Indef.Cuda.Int.Dynamic.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Cuda/Int/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Int.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Int.Storage (module X) where++import Torch.Indef.Cuda.Int.Storage as X+import Torch.Indef.Cuda.Int.Storage.Copy as X
+ src/Torch/Cuda/Long.hs view
@@ -0,0 +1,35 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Long+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Long (module X) where++import Numeric.Dimensions+import Torch.Types.THC as X++import Torch.Cuda.Long.Types as X hiding (storage)+import Torch.Cuda.Long.Index as X hiding (withDynamicState)+import Torch.Cuda.Long.Mask as X++import Torch.Indef.Cuda.Long.Tensor as X+import Torch.Indef.Cuda.Long.Tensor.Copy as X+import Torch.Indef.Cuda.Long.Tensor.Index as X+import Torch.Indef.Cuda.Long.Tensor.Masked as X+import Torch.Indef.Cuda.Long.Tensor.Math as X+import Torch.Indef.Cuda.Long.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Long.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Long.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Long.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Long.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Long.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Long.Tensor.Mode as X+import Torch.Indef.Cuda.Long.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Long.Tensor.Sort as X+import Torch.Indef.Cuda.Long.Tensor.TopK as X++import Torch.Indef.Cuda.Long.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Cuda/Long/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Long.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Long.Dynamic (module X) where++import Torch.Indef.Cuda.Long.Dynamic.Tensor as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Copy as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Index as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Masked as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Math as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Mode as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.Sort as X+import Torch.Indef.Cuda.Long.Dynamic.Tensor.TopK as X++import Torch.Indef.Cuda.Long.Dynamic.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Cuda/Long/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Long.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Long.Storage (module X) where++import Torch.Indef.Cuda.Long.Storage as X+import Torch.Indef.Cuda.Long.Storage.Copy as X
+ src/Torch/Cuda/Short.hs view
@@ -0,0 +1,29 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Short+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Short (module X) where++import Torch.Cuda.Short.Index as X+import Torch.Indef.Cuda.Short.Tensor as X+import Torch.Indef.Cuda.Short.Tensor.Copy as X+import Torch.Indef.Cuda.Short.Tensor.Index as X+import Torch.Indef.Cuda.Short.Tensor.Masked as X+import Torch.Indef.Cuda.Short.Tensor.Math as X+import Torch.Indef.Cuda.Short.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Short.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Short.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Short.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Short.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Short.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Short.Tensor.Mode as X+import Torch.Indef.Cuda.Short.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Short.Tensor.Sort as X+import Torch.Indef.Cuda.Short.Tensor.TopK as X++import Torch.Indef.Cuda.Short.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Cuda/Short/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Short.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Short.Dynamic (module X) where++import Torch.Indef.Cuda.Short.Dynamic.Tensor as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Copy as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Index as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Masked as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Math as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Mode as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.Sort as X+import Torch.Indef.Cuda.Short.Dynamic.Tensor.TopK as X++import Torch.Indef.Cuda.Short.Dynamic.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Cuda/Short/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Cuda.Short.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Cuda.Short.Storage (module X) where++import Torch.Indef.Cuda.Short.Storage as X+import Torch.Indef.Cuda.Short.Storage.Copy as X
+ src/Torch/Double.hs view
@@ -0,0 +1,60 @@+{-# LANGUAGE TypeSynonymInstances #-}+module Torch.Double (module X) where++import Numeric.Dimensions as X+import Torch.Types.TH as X+import Torch.Double.NN as X++import Torch.Double.Types as X hiding (storage)+import Torch.Double.Index as X hiding (withDynamicState)+import Torch.Double.Mask as X++import Torch.Indef.Double.Tensor as X+import Torch.Indef.Double.Tensor.Copy as X+import Torch.Indef.Double.Tensor.Index as X+import Torch.Indef.Double.Tensor.Masked as X+import Torch.Indef.Double.Tensor.Math as X+import Torch.Indef.Double.Tensor.Math.Compare as X+import Torch.Indef.Double.Tensor.Math.CompareT as X+import Torch.Indef.Double.Tensor.Math.Pairwise as X+import Torch.Indef.Double.Tensor.Math.Pointwise as X+import Torch.Indef.Double.Tensor.Math.Reduce as X+import Torch.Indef.Double.Tensor.Math.Scan as X+import Torch.Indef.Double.Tensor.Mode as X+import Torch.Indef.Double.Tensor.ScatterGather as X+import Torch.Indef.Double.Tensor.Sort as X+import Torch.Indef.Double.Tensor.TopK as X++import Torch.Indef.Double.Tensor.Math.Pointwise.Signed as X++import Torch.Indef.Double.Tensor.Math.Blas as X+import Torch.Indef.Double.Tensor.Math.Floating as X+import Torch.Indef.Double.Tensor.Math.Lapack as X+import Torch.Indef.Double.Tensor.Math.Pointwise.Floating as X+import Torch.Indef.Double.Tensor.Math.Reduce.Floating as X++import Torch.Indef.Double.Tensor.Math.Random.TH as X+import Torch.Indef.Double.Tensor.Random.TH as X+import Torch.Core.Random as X (newRNG, seed, manualSeed, initialSeed)++-------------------------------------------------------------------------------++import System.IO.Unsafe++instance Dimensions d => Fractional (Tensor d) where+ fromRational = constant . fromRational+ (/) = (^/^)++instance Dimensions d => Floating (Tensor d) where+ pi = X.constant pi+ exp = X.exp+ log = X.log+ sqrt = X.sqrt+ sin = X.sin+ cos = X.cos+ asin = X.asin+ acos = X.acos+ atan = X.atan+ sinh = X.sinh+ cosh = X.cosh+
+ src/Torch/Double/Dynamic.hs view
@@ -0,0 +1,36 @@+module Torch.Double.Dynamic (module X) where++import Torch.Types.TH as X+import Torch.Double.Types as X hiding (storage)+import Torch.Double.Index as X hiding (withDynamicState)+import Torch.Double.Mask as X++import Torch.Double.Dynamic.NN as X++import Torch.Indef.Double.Dynamic.Tensor as X+import Torch.Indef.Double.Dynamic.Tensor.Copy as X+import Torch.Indef.Double.Dynamic.Tensor.Index as X+import Torch.Indef.Double.Dynamic.Tensor.Masked as X+import Torch.Indef.Double.Dynamic.Tensor.Math as X+import Torch.Indef.Double.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Double.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Double.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Double.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Double.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Double.Dynamic.Tensor.Mode as X+import Torch.Indef.Double.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Double.Dynamic.Tensor.Sort as X+import Torch.Indef.Double.Dynamic.Tensor.TopK as X++import Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Signed as X++import Torch.Indef.Double.Dynamic.Tensor.Math.Blas as X+import Torch.Indef.Double.Dynamic.Tensor.Math.Floating as X+import Torch.Indef.Double.Dynamic.Tensor.Math.Lapack as X+import Torch.Indef.Double.Dynamic.Tensor.Math.Pointwise.Floating as X+import Torch.Indef.Double.Dynamic.Tensor.Math.Reduce.Floating as X++import Torch.Indef.Double.Dynamic.Tensor.Math.Random.TH as X+import Torch.Indef.Double.Dynamic.Tensor.Random.TH as X+import Torch.Core.Random as X (newRNG, seed, manualSeed, initialSeed)
+ src/Torch/Double/Storage.hs view
@@ -0,0 +1,6 @@+module Torch.Double.Storage (module X) where++import Torch.Types.TH as X+import Torch.Double.Types as X+import Torch.Indef.Double.Storage as X+import Torch.Indef.Double.Storage.Copy as X
+ src/Torch/Float.hs view
@@ -0,0 +1,73 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Float+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+--+-- Reexports of Float-specific code from hasktorch-indef.+-------------------------------------------------------------------------------+{-# OPTIONS_GHC -fno-cse #-}+{-# LANGUAGE TypeSynonymInstances #-}+module Torch.Float (module X) where++import Numeric.Dimensions+import Torch.Types.TH as X+import Torch.Float.NN as X++import Torch.Float.Types as X hiding (storage)+import Torch.Float.Index as X hiding (withDynamicState)+import Torch.Float.Mask as X++import Torch.Indef.Float.Tensor as X+import Torch.Indef.Float.Tensor.Copy as X+import Torch.Indef.Float.Tensor.Index as X+import Torch.Indef.Float.Tensor.Masked as X+import Torch.Indef.Float.Tensor.Math as X+import Torch.Indef.Float.Tensor.Math.Compare as X+import Torch.Indef.Float.Tensor.Math.CompareT as X+import Torch.Indef.Float.Tensor.Math.Pairwise as X+import Torch.Indef.Float.Tensor.Math.Pointwise as X+import Torch.Indef.Float.Tensor.Math.Reduce as X+import Torch.Indef.Float.Tensor.Math.Scan as X+import Torch.Indef.Float.Tensor.Mode as X+import Torch.Indef.Float.Tensor.ScatterGather as X+import Torch.Indef.Float.Tensor.Sort as X+import Torch.Indef.Float.Tensor.TopK as X++import Torch.Indef.Float.Tensor.Math.Pointwise.Signed as X++import Torch.Indef.Float.Tensor.Math.Blas as X+import Torch.Indef.Float.Tensor.Math.Floating as X+import Torch.Indef.Float.Tensor.Math.Lapack as X+import Torch.Indef.Float.Tensor.Math.Pointwise.Floating as X+import Torch.Indef.Float.Tensor.Math.Reduce.Floating as X++import Torch.Indef.Float.Tensor.Math.Random.TH as X+import Torch.Indef.Float.Tensor.Random.TH as X+import Torch.Core.Random as X (newRNG, seed, manualSeed, initialSeed)++-------------------------------------------------------------------------------++import System.IO.Unsafe++instance Dimensions d => Fractional (Tensor d) where+ fromRational = constant . fromRational+ (/) = (^/^)++instance Dimensions d => Floating (Tensor d) where+ pi = X.constant pi+ exp = X.exp+ log = X.log+ sqrt = X.sqrt+ sin = X.sin+ cos = X.cos+ asin = X.asin+ acos = X.acos+ atan = X.atan+ sinh = X.sinh+ cosh = X.cosh++
+ src/Torch/Float/Dynamic.hs view
@@ -0,0 +1,37 @@+module Torch.Float.Dynamic (module X) where++import Torch.Types.TH as X++import Torch.Float.Dynamic.NN as X++import Torch.Float.Types as X hiding (storage)+import Torch.Float.Index as X hiding (withDynamicState)+import Torch.Float.Mask as X++import Torch.Indef.Float.Dynamic.Tensor as X+import Torch.Indef.Float.Dynamic.Tensor.Copy as X+import Torch.Indef.Float.Dynamic.Tensor.Index as X+import Torch.Indef.Float.Dynamic.Tensor.Masked as X+import Torch.Indef.Float.Dynamic.Tensor.Math as X+import Torch.Indef.Float.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Float.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Float.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Float.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Float.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Float.Dynamic.Tensor.Mode as X+import Torch.Indef.Float.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Float.Dynamic.Tensor.Sort as X+import Torch.Indef.Float.Dynamic.Tensor.TopK as X++import Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Signed as X++import Torch.Indef.Float.Dynamic.Tensor.Math.Blas as X+import Torch.Indef.Float.Dynamic.Tensor.Math.Floating as X+import Torch.Indef.Float.Dynamic.Tensor.Math.Lapack as X+import Torch.Indef.Float.Dynamic.Tensor.Math.Pointwise.Floating as X+import Torch.Indef.Float.Dynamic.Tensor.Math.Reduce.Floating as X++import Torch.Indef.Float.Dynamic.Tensor.Math.Random.TH as X+import Torch.Indef.Float.Dynamic.Tensor.Random.TH as X+import Torch.Core.Random as X (newRNG, seed, manualSeed, initialSeed)
+ src/Torch/Float/Storage.hs view
@@ -0,0 +1,4 @@+module Torch.Float.Storage (module X) where++import Torch.Indef.Float.Storage as X+import Torch.Indef.Float.Storage.Copy as X
+ src/Torch/Int.hs view
@@ -0,0 +1,29 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Int+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Int (module X) where++import Torch.Int.Index as X+import Torch.Indef.Int.Tensor as X+import Torch.Indef.Int.Tensor.Copy as X+import Torch.Indef.Int.Tensor.Index as X+import Torch.Indef.Int.Tensor.Masked as X+import Torch.Indef.Int.Tensor.Math as X+import Torch.Indef.Int.Tensor.Math.Compare as X+import Torch.Indef.Int.Tensor.Math.CompareT as X+import Torch.Indef.Int.Tensor.Math.Pairwise as X+import Torch.Indef.Int.Tensor.Math.Pointwise as X+import Torch.Indef.Int.Tensor.Math.Reduce as X+import Torch.Indef.Int.Tensor.Math.Scan as X+import Torch.Indef.Int.Tensor.Mode as X+import Torch.Indef.Int.Tensor.ScatterGather as X+import Torch.Indef.Int.Tensor.Sort as X+import Torch.Indef.Int.Tensor.TopK as X++import Torch.Indef.Int.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Int/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Int.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Int.Dynamic (module X) where++import Torch.Indef.Int.Dynamic.Tensor as X+import Torch.Indef.Int.Dynamic.Tensor.Copy as X+import Torch.Indef.Int.Dynamic.Tensor.Index as X+import Torch.Indef.Int.Dynamic.Tensor.Masked as X+import Torch.Indef.Int.Dynamic.Tensor.Math as X+import Torch.Indef.Int.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Int.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Int.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Int.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Int.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Int.Dynamic.Tensor.Mode as X+import Torch.Indef.Int.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Int.Dynamic.Tensor.Sort as X+import Torch.Indef.Int.Dynamic.Tensor.TopK as X++import Torch.Indef.Int.Dynamic.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Int/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Int.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Int.Storage (module X) where++import Torch.Indef.Int.Storage as X+import Torch.Indef.Int.Storage.Copy as X
+ src/Torch/Long.hs view
@@ -0,0 +1,35 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Long+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Long (module X) where++import Numeric.Dimensions as X+import Torch.Types.TH as X++import Torch.Long.Types as X hiding (storage)+import Torch.Long.Index as X hiding (withDynamicState)+import Torch.Long.Mask as X++import Torch.Indef.Long.Tensor as X+import Torch.Indef.Long.Tensor.Copy as X+import Torch.Indef.Long.Tensor.Index as X+import Torch.Indef.Long.Tensor.Masked as X+import Torch.Indef.Long.Tensor.Math as X+import Torch.Indef.Long.Tensor.Math.Compare as X+import Torch.Indef.Long.Tensor.Math.CompareT as X+import Torch.Indef.Long.Tensor.Math.Pairwise as X+import Torch.Indef.Long.Tensor.Math.Pointwise as X+import Torch.Indef.Long.Tensor.Math.Reduce as X+import Torch.Indef.Long.Tensor.Math.Scan as X+import Torch.Indef.Long.Tensor.Mode as X+import Torch.Indef.Long.Tensor.ScatterGather as X+import Torch.Indef.Long.Tensor.Sort as X+import Torch.Indef.Long.Tensor.TopK as X++import Torch.Indef.Long.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Long/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Long.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Long.Dynamic (module X) where++import Torch.Indef.Long.Dynamic.Tensor as X+import Torch.Indef.Long.Dynamic.Tensor.Copy as X+import Torch.Indef.Long.Dynamic.Tensor.Index as X+import Torch.Indef.Long.Dynamic.Tensor.Masked as X+import Torch.Indef.Long.Dynamic.Tensor.Math as X+import Torch.Indef.Long.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Long.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Long.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Long.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Long.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Long.Dynamic.Tensor.Mode as X+import Torch.Indef.Long.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Long.Dynamic.Tensor.Sort as X+import Torch.Indef.Long.Dynamic.Tensor.TopK as X++import Torch.Indef.Long.Dynamic.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Long/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Long.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Long.Storage (module X) where++import Torch.Indef.Long.Storage as X+import Torch.Indef.Long.Storage.Copy as X
+ src/Torch/Short.hs view
@@ -0,0 +1,29 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Short+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Short (module X) where++import Torch.Short.Index as X+import Torch.Indef.Short.Tensor as X+import Torch.Indef.Short.Tensor.Copy as X+import Torch.Indef.Short.Tensor.Index as X+import Torch.Indef.Short.Tensor.Masked as X+import Torch.Indef.Short.Tensor.Math as X+import Torch.Indef.Short.Tensor.Math.Compare as X+import Torch.Indef.Short.Tensor.Math.CompareT as X+import Torch.Indef.Short.Tensor.Math.Pairwise as X+import Torch.Indef.Short.Tensor.Math.Pointwise as X+import Torch.Indef.Short.Tensor.Math.Reduce as X+import Torch.Indef.Short.Tensor.Math.Scan as X+import Torch.Indef.Short.Tensor.Mode as X+import Torch.Indef.Short.Tensor.ScatterGather as X+import Torch.Indef.Short.Tensor.Sort as X+import Torch.Indef.Short.Tensor.TopK as X++import Torch.Indef.Short.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Short/Dynamic.hs view
@@ -0,0 +1,28 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Short.Dynamic+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Short.Dynamic (module X) where++import Torch.Indef.Short.Dynamic.Tensor as X+import Torch.Indef.Short.Dynamic.Tensor.Copy as X+import Torch.Indef.Short.Dynamic.Tensor.Index as X+import Torch.Indef.Short.Dynamic.Tensor.Masked as X+import Torch.Indef.Short.Dynamic.Tensor.Math as X+import Torch.Indef.Short.Dynamic.Tensor.Math.Compare as X+import Torch.Indef.Short.Dynamic.Tensor.Math.CompareT as X+import Torch.Indef.Short.Dynamic.Tensor.Math.Pairwise as X+import Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise as X+import Torch.Indef.Short.Dynamic.Tensor.Math.Reduce as X+import Torch.Indef.Short.Dynamic.Tensor.Math.Scan as X+import Torch.Indef.Short.Dynamic.Tensor.Mode as X+import Torch.Indef.Short.Dynamic.Tensor.ScatterGather as X+import Torch.Indef.Short.Dynamic.Tensor.Sort as X+import Torch.Indef.Short.Dynamic.Tensor.TopK as X++import Torch.Indef.Short.Dynamic.Tensor.Math.Pointwise.Signed as X
+ src/Torch/Short/Storage.hs view
@@ -0,0 +1,13 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Short.Storage+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+-------------------------------------------------------------------------------+module Torch.Short.Storage (module X) where++import Torch.Indef.Short.Storage as X+import Torch.Indef.Short.Storage.Copy as X
+ tests/GarbageCollectionSpec.hs view
@@ -0,0 +1,118 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+module GarbageCollectionSpec (spec) where++import Numeric.Dimensions+import Torch.Double.Dynamic as Math+import qualified Torch.Core.Random as R (newRNG)++import Torch.Prelude.Extras++main :: IO ()+main = hspec spec++spec :: Spec+spec = do+ -- it "runs scenario: testGCTensor" testGCTensor+ -- it "runs scenario: testOps" testOps+ it "runs scenario: rawTest" rawTest+ it "runs scenario: testCadd" testCadd+ it "runs scenario: testCopy" testCopy+ it "runs scenario: testLapack" testLapack+ it "runs scenario: matrixMultTest" matrixMultTest++{-+-- | basic test of garbage collected tensor+testGCTensor :: Property+testGCTensor = monadicIO . run $ do+ let t0 = _new (dims :: Dims '[8, 4])+ t1 = t0+ _fill 3 t1+ let t2 = _fill 6 t1+ print t0 -- should be matrix of 3.0+ print t1 -- should be matrix of 3.0+ print t2 -- should be matrix of 6.0++testOps :: IO ()+testOps = do+ print $ _neg $ _addConst (_new (dims :: Dims '[2, 2])) 3+ print $ _sigmoid $ _neg $ _addConst (_new (dims :: Dims '[2,2])) 3+ new (dims :: Dims '[2, 2]) >>= addConst () 3 >>= sigmoid >>= \(r::DoubleDynamic) -> print r++ foo :: DoubleDynamic <- constant (dims :: Dims '[5]) 3+ print (3.0 * 3.0 * 5 :: Double)+ dot foo foo >>= print++ new (dims :: Dims '[5]) >>= (`add` 2) >>= \(r::DoubleDynamic) -> print r+ new (dims :: Dims '[5]) >>= (`add` 2) >>= (`Math.div` 4) >>= \(r::DoubleDynamic) -> print r+-}++-- TODO : move raw test elsewhere?+rawTest = do+ let+ x :: DoubleDynamic+ x = constant (dims :: Dims '[5]) 2.0+ y = constant (dims :: Dims '[5]) 3.0+ z = constant (dims :: Dims '[5]) 4.0+ print x+ -- cadd = z <- y + scalar * x, z value discarded+ print (2.0 * 4.4 + 3.0 :: Double)+ cadd_ z 4.4 x+ cadd_ y 4.4 x+ print z+ print y++testCadd = do+ let foo :: DoubleDynamic = constant (dims :: Dims '[5]) 5+ bar :: DoubleDynamic = constant (dims :: Dims '[5]) 2+ print $ 5 + 3 * 2+ print $ cadd foo 3 bar++testCopy :: IO ()+testCopy = do+ let foo :: DoubleDynamic = new (dims :: Dims '[3, 3])+ fill_ foo 5+ bar <- newWithTensor foo+ print foo+ print bar+ let baz = foo `add` 2+ let fob = bar `sub` 2+ print foo+ print bar+ print baz+ print fob+ pure ()++matrixMultTest :: IO ()+matrixMultTest = do+ gen <- R.newRNG+ let Just o10 = ord2Tuple (-10, 10)+ mapM_ (\_ -> go gen o10) [1..10]+ where+ go gen o10 = do+ mat' :: DoubleDynamic <- uniform (dims :: Dims '[10, 7]) gen o10+ vec' :: DoubleDynamic <- uniform (dims :: Dims '[7]) gen o10+ print mat'+ print vec'+ -- print $ mat !* vec++testLapack :: IO ()+testLapack = do+ rng <- R.newRNG+ let Just o1 = ord2Tuple (-1.0, 1.0)+ t :: DoubleDynamic <- uniform (dims :: Dims '[2, 2]) rng o1++ let b = constant (dims :: Dims '[2, 1]) 1.0+ x = constant (dims :: Dims '[2, 1]) 0+ lu = constant (dims :: Dims '[2, 2]) 0++ gesv_ (x, lu) b t+ print x+ print lu++ let resQ = constant (dims :: Dims '[2, 2]) 0+ resR = constant (dims :: Dims '[2, 2]) 0+ qr_ (resQ,resR) t+ print resQ+ print resR+
+ tests/MemorySpec.hs view
@@ -0,0 +1,100 @@+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE DataKinds #-}+module MemorySpec (spec) where++import Test.Hspec+import Control.Exception (bracket)+import Control.Monad (forM_)+import Numeric.Dimensions++import Torch.Double.Dynamic as Dynamic++import System.Mem ()++-- |Confirm that memory is deallocated (works)+main :: IO ()+main = hspec spec++spec :: Spec+spec = do+ it "scenario: memoryTestMinimal" memoryTestMinimal++headIdx :: Dims '[0, 0, 0, 0]+headIdx = dims++headIdx' :: SomeDims+headIdx' = SomeDims (dims :: Dims '[0, 0, 0, 0])++iterator :: SomeDims -> Int -> IO ()+iterator = iteratorBracket++-- |Leaks memory+iteratorAssign :: SomeDims -> Int -> IO ()+iteratorAssign d niter = do+ putStrLn $ show (memSizeGB d) ++ " GB per allocation x " ++ show niter+ forM_ [1..niter] $ \iter -> do+ putStr ("Iteration : " ++ show iter ++ " / ")+ let x = (Dynamic.new' d :: DoubleDynamic) `getDim` headIdx+ putStrLn $ "Printing dummy value: " ++ show x+ putStrLn "Done"++-- |Releases memory on OSX (but not consistently on linux)+iteratorMonadic :: SomeDims -> Int -> IO ()+iteratorMonadic d niter = do+ putStrLn $ show (memSizeGB d) ++ " GB per allocation x " ++ show niter+ forM_ [1..niter] $ \iter -> do+ putStr ("Iteration : " ++ show iter ++ " / ")+ let x = (Dynamic.new' d :: DoubleDynamic) `getDim` headIdx+ putStrLn $ "Printing dummy value: " ++ show x+ putStrLn "Done"++-- |Releases memory+iteratorBracket :: SomeDims -> Int -> IO ()+iteratorBracket d niter = do+ putStrLn $ show (memSizeGB d) ++ " GB per allocation x " ++ show niter+ forM_ [1..niter] $ \iter ->+ bracket (pure iter)+ (\iter -> do+ putStr ("Iteration : " ++ show iter ++ " / ")+ let x = (Dynamic.new' d :: DoubleDynamic) `getDim` headIdx+ putStrLn $ "Printing dummy value: " ++ show x+ )+ (const (pure ()))+ putStrLn "Done"++manualAlloc1 :: IO ()+manualAlloc1 = do+ putStrLn "Allocating"+ let !(t :: DoubleDynamic) = new (dims :: Dims '[200, 200, 200, 200])+ let x = getDim t headIdx+ putStrLn $ "Printing dummy value: " ++ show x++manualAlloc2 :: Double -> IO (DoubleDynamic)+manualAlloc2 v = do+ putStrLn "Allocating"+ let !(t :: DoubleDynamic) = constant (dims :: Dims '[200, 200, 100, 100]) v+ let x = getDim t headIdx+ putStrLn $ "Printing dummy value: " ++ show x+ pure t++pr :: DoubleDynamic -> IO ()+pr t = do+ let v = getDim t headIdx+ putStrLn $ "Printing dummy value: " ++ show v++-- |getDim' size per allocation+memSizeGB :: SomeDims -> Double+memSizeGB (SomeDims d) = (fromIntegral (totalDim d) * 8) / 1000000000.0++memoryTestLarge :: IO ()+memoryTestLarge = iterator (SomeDims (dims :: Dims '[200, 200, 200, 200])) 1000000 -- 12.8 GB x 1M = 12M GB++memoryTestSmall :: IO ()+memoryTestSmall = iterator (SomeDims (dims :: Dims '[100, 100, 100, 7])) 300 -- 50 MB x 300 = 15 GB++memoryTestFast :: IO ()+memoryTestFast = iterator (SomeDims (dims :: Dims '[50, 50, 50, 5])) 10000 -- 5 MB x 1000 = 5 GB++memoryTestMinimal :: IO ()+memoryTestMinimal = iterator (SomeDims (dims :: Dims '[50, 50, 50, 5])) 100 -- 5 MB x 100 = 500 MB
+ tests/Orphans.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE FlexibleInstances #-}+module Orphans () where++import Data.Function (on)+import Test.QuickCheck++instance Num a => Num (Positive a) where+ (-) = Positive .: ((-) `on` getPositive)+ (+) = Positive .: ((+) `on` getPositive)+ (*) = Positive .: ((*) `on` getPositive)+ abs = Positive . abs . getPositive+ signum = Positive . signum . getPositive+ fromInteger = Positive . fromInteger++(.:) = (.) . (.)++
+ tests/RawLapackSVDSpec.hs view
@@ -0,0 +1,40 @@+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE DataKinds #-}+module RawLapackSVDSpec where++import Foreign.C.Types++import Numeric.Dimensions+import Torch.Float.Dynamic++import Torch.Prelude.Extras++main :: IO ()+main = hspec spec++spec :: Spec+spec = do+ it "scenario: pcaRaw" pcaRaw++pcaRaw :: IO ()+pcaRaw = do++ let a :: FloatDynamic = constant (dims :: Dims '[2, 2]) 2+ print a++ let b = constant (dims :: Dims '[2]) 1+ print b++ set2d_ a 0 0 1.0+ set2d_ a 0 1 2.0+ set2d_ a 1 0 3.0+ set2d_ a 1 0 4.0+ print a+ print b++ let resA = constant (dims :: Dims '[2, 2]) 0+ let resB = constant (dims :: Dims '[2, 2]) 0+ gesv_ (resB,resA) b a+ print resA+ print resB+
+ tests/Spec.hs view
@@ -0,0 +1,25 @@+{- O-P-T-I-O-N-S_GHC -F -pgmF hspec-discover -}+module Main where++import Test.Hspec+import qualified MemorySpec as MS+import qualified RawLapackSVDSpec as SVDS+import qualified GarbageCollectionSpec as GS+import qualified Torch.Core.LogAddSpec as LS+import qualified Torch.Core.RandomSpec as RS+import qualified Torch.Static.NN.AbsSpec as AbsNN+import qualified Torch.Static.NN.LinearSpec as LinearNN+import qualified Torch.Static.NN.ReLUSpec as ReLUNN++main :: IO ()+main = hspec $ do+ describe "MemorySpec" MS.spec+ describe "RawLapackSVDSpec" SVDS.spec+ describe "GarbageCollectionSpec" GS.spec+ describe "Torch.Core.LogAddSpec" LS.spec+ describe "Torch.Core.RandomSpec" RS.spec+ describe "Torch.Static.NN.AbsSpec" AbsNN.spec+ describe "Torch.Static.NN.ReLUSpec" ReLUNN.spec+ describe "Torch.Static.NN.LinearSpec" LinearNN.spec++
+ tests/Torch/Core/LogAddSpec.hs view
@@ -0,0 +1,37 @@+{-# LANGUAGE ScopedTypeVariables #-}+module Torch.Core.LogAddSpec (spec) where++import Torch.Core.LogAdd+import Torch.Prelude.Extras++main :: IO ()+main = hspec spec+++spec :: Spec+spec = do+ describe "logAdd" logAddSpec+ describe "logSub" logSubSpec+ describe "expMinusApprox" expMinusApproxSpec+++logAddSpec :: Spec+logAddSpec = do+ it "returns a value" . property $ \((a, b)::(Double, Double)) ->+ a `logAdd` b >>= (`shouldSatisfy` doesn'tCrash)+++logSubSpec :: Spec+logSubSpec =+ it "returns a value" . property $ \((a, b)::(Double, Double)) ->+ if a < b+ then a `logSub` b `shouldThrow` anyException+ else a `logSub` b >>= (`shouldSatisfy` doesn'tCrash)+++expMinusApproxSpec :: Spec+expMinusApproxSpec =+ it "returns a value" . property $ \(a::Double) ->+ expMinusApprox a >>= (`shouldSatisfy` doesn'tCrash)++
+ tests/Torch/Core/RandomSpec.hs view
@@ -0,0 +1,161 @@+{-# LANGUAGE ScopedTypeVariables #-}+module Torch.Core.RandomSpec (spec) where++import Test.Hspec+import Test.QuickCheck+import Test.QuickCheck.Monadic++import Control.Monad (replicateM)+import Foreign (Ptr)++import qualified Control.Exception as E+import Torch.Core.Random as R+import Torch.Prelude.Extras (doesn'tCrash)+import Orphans ()+++main :: IO ()+main = hspec spec++spec :: Spec+spec = do+ describe "newRNG" newRNGSpec+ describe "seed" seedSpec+ describe "manualSeed" manualSeedSpec+ describe "initialSeed" initialSeedSpec+ describe "random" randomSpec+ describe "uniform" uniformSpec+ describe "normal" normalSpec+ describe "exponential" exponentialSpec+ describe "cauchy" cauchySpec+ describe "logNormal" logNormalSpec+ describe "geometric" geometricSpec+ describe "bernoulli" bernoulliSpec+ describe "scenario" $ do+ it "runs this scenario as expected" $ testScenario++newRNGSpec :: Spec+newRNGSpec = do+ rngs <- runIO (replicateM 10 R.newRNG)+ it "always creates a new random number" $+ zipWith (==) (tail rngs) (init rngs) `shouldNotContain` [True]++seedSpec :: Spec+seedSpec = do+ beforeAll+ (do+ rngs <- (replicateM 10 R.newRNG)+ rng1 <- mapM seed rngs+ rng2 <- mapM seed rngs+ pure (rngs, rng1, rng2)+ )+ (describe "seedSpec" $ do+ it "generates different values, given the same starting generators" $+ \(rngs, rng1, rng2) -> do+ zipWith (==) rng1 rng2 `shouldNotContain` [True]+ )++manualSeedSpec :: Spec+manualSeedSpec = do+ rngs <- runIO (replicateM 10 R.newRNG)+ rng1 <- runIO $ mapM (`manualSeed` 1) rngs+ rng2 <- runIO $ mapM (`manualSeed` 1) rngs++ it "generates the same value, given the same seed values" $+ zipWith (==) rng1 rng2 `shouldNotContain` [False]++initialSeedSpec :: Spec+initialSeedSpec = do+ it "doesn't crash" $+ pending++randomSpec :: Spec+randomSpec = do+ rngs <- runIO (replicateM 10 R.newRNG)+ rs <- runIO $ mapM random rngs+ it "generates numbers and doesn't crash" $+ rs `shouldSatisfy` doesn'tCrash++uniformSpec :: Spec+uniformSpec = do+ rng <- runIO R.newRNG+ distributed2BoundsCheck rng uniform $ \a b x ->+ case compare a b of+ LT -> x <= b && x >= a+ _ -> x <= a && x >= b++normalSpec :: Spec+normalSpec = do+ rng <- runIO R.newRNG+ distributed2BoundsCheck rng (withStdv normal) (\a b x -> doesn'tCrash ())++exponentialSpec :: Spec+exponentialSpec = do+ rng <- runIO R.newRNG+ distributed1BoundsCheck rng exponential property (\a x -> doesn'tCrash ())++cauchySpec :: Spec+cauchySpec = do+ rng <- runIO R.newRNG+ distributed2BoundsCheck rng cauchy (\a b x -> doesn'tCrash ())++logNormalSpec :: Spec+logNormalSpec = do+ rng <- runIO R.newRNG+ distributed2BoundsCheck rng (withStdv logNormal) (\a b x -> doesn'tCrash ())++geometricSpec :: Spec+geometricSpec = do+ rng <- runIO R.newRNG+ distributed1BoundsCheck rng geometric (forAll $ choose (0.0001, 0.9999)) (\a x -> doesn'tCrash ())++bernoulliSpec :: Spec+bernoulliSpec = do+ rng <- runIO R.newRNG+ distributed1BoundsCheck rng bernoulli (forAll $ choose (0.0001, 0.9999)) (\a x -> doesn'tCrash ())++-- |Check that seeds work as intended+testScenario :: IO ()+testScenario = do+ rng <- R.newRNG+ manualSeed rng 332323401+ val1 <- normal rng 0.0 1000+ val2 <- normal rng 0.0 1000+ E.assert (val1 /= val2) pure ()+ manualSeed rng 332323401+ manualSeed rng 332323401+ val3 <- normal rng 0.0 1000.0+ E.assert (val1 == val3) pure ()+++-- ========================================================================= --++withStdv+ :: (Generator -> a -> b -> IO Double)+ -> Generator+ -> a+ -> NonZero (Positive b)+ -> IO Double+withStdv fn g a b = fn g a (getPositive (getNonZero b))+++distributed2BoundsCheck+ :: (Show a, Show b, Arbitrary a, Arbitrary b)+ => Generator+ -> (Generator -> a -> b -> IO Double)+ -> (a -> b -> Double -> Bool)+ -> Spec+distributed2BoundsCheck g fun check = do+ it "should generate random numbers in the correct bounds" . property $ \(a, b) ->+ monadicIO $ do+ x <- run (fun g a b)+ assert (check a b x)++distributed1BoundsCheck :: (Show a, Arbitrary a) => Generator -> (Generator -> a -> IO b) -> ((a -> Property) -> Property) -> (a -> b -> Bool) -> Spec+distributed1BoundsCheck g fun pfun check = do+ it "should generate random numbers in the correct bounds" . pfun $ \a -> monadicIO $ do+ x <- run (fun g a)+ assert (check a x)+++
+ tests/Torch/Prelude/Extras.hs view
@@ -0,0 +1,18 @@+module Torch.Prelude.Extras+ ( module X+ , doesn'tCrash+ , doesn'tCrashM+ ) where++import Test.Hspec as X+import Test.QuickCheck as X+import Test.QuickCheck.Monadic as X++import Orphans as X++doesn'tCrash :: a -> Bool+doesn'tCrash = const True++doesn'tCrashM :: Monad m => a -> m Bool+doesn'tCrashM = const (pure True)+
+ tests/Torch/Static/NN/AbsSpec.hs view
@@ -0,0 +1,29 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE ScopedTypeVariables #-}+module Torch.Static.NN.AbsSpec where++import Test.Hspec+import Torch.Double++main :: IO ()+main = hspec spec++spec :: Spec+spec = do+ describe "abs_updateOutput" $ do+ it "runs the absolute function" $ do+ Just (x :: DoubleTensor '[2, 4]) <- fromList [-4..4-1]+ y <- tensordata <$> abs_updateOutput x+ y `shouldSatisfy` all (>= 0)++ describe "abs_updateGradInput" $ do+ it "returns the input gradient" $ do+ Just (x :: DoubleTensor '[2, 4]) <- fromList [-4..4-1]+ let go :: DoubleTensor '[2, 4] = constant 1+ let rs = tensordata (signum x)+ ys <- tensordata <$> abs_updateGradInput x go+ zip ys rs `shouldSatisfy` all eqSigns+ where+ eqSigns :: (Double, Double) -> Bool+ eqSigns (y, r) = y == r || (r == 0 && y == 1)+
+ tests/Torch/Static/NN/LinearSpec.hs view
@@ -0,0 +1,394 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE TupleSections #-}+{-# LANGUAGE DeriveGeneric #-}+{-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE TypeOperators #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE CPP #-}++#if MIN_VERSION_base(4,12,0)+{-# LANGUAGE NoStarIsType #-}+#endif++{-# OPTIONS_GHC -fno-cse #-}+module Torch.Static.NN.LinearSpec where++import GHC.TypeLits+import Control.Monad (join, void)+import Data.Function ((&))+import Data.Foldable+import Debug.Trace+import Data.Maybe+import GHC.Generics (Generic)+import Test.Hspec+import Lens.Micro.Platform+import Numeric.Backprop+import System.IO.Unsafe+import Data.Generics.Product+import qualified Numeric.Backprop as B++import Debug.Trace++import Torch.Double as Torch+import Torch.Double.NN.Linear+import qualified Torch.Long as Long++reasonablyUnsafeVector :: (KnownDim m, KnownNat m) => [HsReal] -> Tensor '[m]+reasonablyUnsafeVector = unsafePerformIO . unsafeVector+{-# NOINLINE reasonablyUnsafeVector #-}++reasonablyUnsafeLongVector :: (KnownDim m, KnownNat m) => [Long.HsReal] -> Long.Tensor '[m]+reasonablyUnsafeLongVector = unsafePerformIO . Long.unsafeVector+{-# NOINLINE reasonablyUnsafeLongVector #-}++reasonablyUnsafeMatrix+ :: All KnownDim '[m, n, n*m]+ => All KnownNat '[m, n, n*m]+ => [[HsReal]]+ -> Tensor '[n,m]+reasonablyUnsafeMatrix = unsafePerformIO . unsafeMatrix+{-# NOINLINE reasonablyUnsafeMatrix #-}++xavier :: forall d . Dimensions d => IO (Tensor d)+xavier = case (fromIntegral <$> listDims (dims :: Dims d)) of+ [] -> pure empty+ a:_ -> pure $ constant (1 / realToFrac (fromIntegral a))++data FF2Network i h o = FF2Network+ { layer1 :: Linear i h+ , layer2 :: Linear h o+ } deriving (Generic, Show)++instance (KnownDim i, KnownDim h, KnownDim o) => Pairwise (FF2Network i h o) HsReal where+ (FF2Network l0 l1) ^+ v = FF2Network (l0 ^+ v) (l1 ^+ v)+ (FF2Network l0 l1) ^- v = FF2Network (l0 ^+ v) (l1 ^+ v)+ (FF2Network l0 l1) ^* v = FF2Network (l0 ^+ v) (l1 ^+ v)+ (FF2Network l0 l1) ^/ v = FF2Network (l0 ^+ v) (l1 ^+ v)++weightsL :: Lens' (Linear i o) (Tensor '[i, o])+weightsL = field @"getTensors" . _1++biasL :: Lens' (Linear i o) (Tensor '[o])+biasL = field @"getTensors" . _2++specupdate+ :: forall i h o+ . All KnownDim '[i, h, o]+ => FF2Network i h o+ -> FF2Network i h o+ -> FF2Network i h o+specupdate i g = FF2Network+ { layer1 = B.add (layer1 i) (layer1 g)+ , layer2 = B.add (layer2 i) (layer2 g)+ }++instance (KnownDim i, KnownDim h, KnownDim o) => Backprop (FF2Network i h o)++-- ========================================================================= --++main :: IO ()+main = hspec spec++spec :: Spec+spec = do+ describe "a single linear layer" singleLayer+ describe "a two-layer feed forward network" $ do+ describe "with xavier initialization" twoLayerXavier+ describe "forcing ReLU activity" twoLayerForceReLU+ describe "overfitting to [0, 1]" $ do+ describe "with one layer and binary cross-entropy" oneLayerOverfit+ describe "with two layers and binary cross-entropy" twoLayerOverfit+ -- describe "with logSoftmax and multiclass log-loss" $+ -- twoLayerOverfit logSoftMax (classNLLCriterion (reasonablyUnsafeLongVector [1])) Torch.exp++-- ========================================================================= --++singleLayer :: Spec+singleLayer = do+ ll :: Linear 3 2 <- runIO $ mkLinear xavier+ xavierPurityCheck ll $ do+ describe "the forward pass" $ do+ let y = constant 5 :: Tensor '[3]+ o = evalBP2 (linear) ll y++ it "performs matrix multipication as you would expect" $ do+ o =##= ((5/3)*3) + 1/2+ o `elementsSatisfy` ((== 2) . length)++ describe "the backward pass" $ do+ let y = constant 1 :: Tensor '[3]+ (_, (ll', o)) = backprop2 linear ll y++ it "returns plain gradient of weights" $ weights ll' =##= 1 -- 1/2+ it "returns plain gradient of bias" $ bias ll' =##= 3/2 -- 2/3+ it "returns plain gradient of output tensor" $ o =##= 2/3 -- 1/3++-- ========================================================================= --++mkXavierNetwork :: All KnownDim '[i,h,o] => IO (FF2Network i h o)+mkXavierNetwork =+ FF2Network+ <$> mkLinear xavier+ <*> mkLinear xavier+++mkUniform :: All KnownDim '[i,h,o] => IO (FF2Network i h o)+mkUniform = do+ g <- newRNG+ manualSeed g 1+ let Just rg = ord2Tuple (-1, 1)+ w0 <- uniform g rg+ w1 <- uniform g rg+ pure $ FF2Network+ (Linear (w0, constant 1))+ (Linear (w1, constant 1))+++mkGaussianNetwork :: All KnownDim '[i,h,o] => IO (FF2Network i h o)+mkGaussianNetwork = do+ g <- newRNG+ manualSeed g 1+ let Just std = positive 2++ FF2Network+ <$> mkLinear (normal g 0 std)+ <*> mkLinear (normal g 0 std)+++ff2network+ :: forall s i h o+ . Reifies s W+ => All KnownDim '[i,h,o]+ => (forall s . Reifies s W => BVar s (Tensor '[o]) -> BVar s (Tensor '[o]))+ -> Double+ -> BVar s (FF2Network i h o) -- ^ ff2network architecture+ -> BVar s (Tensor '[i]) -- ^ input+ -> BVar s (Tensor '[1, o]) -- ^ output+ff2network final lr arch inp+ = linear {-lr-} (arch ^^. field @"layer1") inp+ & relu+ & linear {-lr-} (arch ^^. field @"layer2")+ & final+ & foo+ where+ foo t = unsqueeze1dBP (dim :: Dim 0) t++twoLayerXavier :: Spec+twoLayerXavier = do+ ll :: FF2Network 4 6 2 <- runIO mkXavierNetwork+ describe "the forward pass" $ do+ describe "with xavier instantiation" $ do+ xavierPurityCheck (ll ^. field @"layer1") $+ xavierPurityCheck (ll ^. field @"layer2") $+ describe "with input all positive input" $ do+ let y = constant 4 :: Tensor '[4]+ (o, _) = backprop2 (ff2network softmax undefined) ll y+ it "performs matrix multipication as you would expect" $ o `approx` [1/2, 1/2]++ describe "with input that drops all values via ReLU" $ do+ let y = constant (-1) :: Tensor '[4]+ (o, _) = backprop2 (ff2network softmax undefined) ll y++ it "performs matrix multipication as you would expect" $ o `approx` [1/2, 1/2]+ where+ approx = lapproximately 0.0001+++twoLayerForceReLU :: Spec+twoLayerForceReLU = do+ describe "operations that force relu activity" $ do+ let o1 = evalBP2 (relu .: linear {-1-}) (ff2 ^. field @"layer1") oneInput+ o2 = evalBP2 ( linear {-1-}) (ff2 ^. field @"layer2") o1+ gin :: Tensor '[4]+ (out, (gff2, gin)) = backprop2 (ff2network logSoftMax 1) ff2 oneInput++ describe "dropping half the gradient during ReLU" $ do+ describe "the forward pass" $ do+ it "returns [0,0,0,4,4,4] after the first layer" $+ tensordata o1 `shouldBe` [0,0,0,4,4,4]++ it "returns [-12,0] after the second layer" $+ tensordata o2 `shouldBe` [-12, 0]++ it "returns [0, 1] as the output" $ do+ Torch.exp out `lapprox` [0, 1]++ describe "the backward pass" $ do+ it "returns a half zero-d out layer 1 gradient" $ do+ (gff2 ^. field @"layer1" . weightsL) `approx` l1weightgrad++ it "returns a quarter zero-d out layer 2 gradient" $ do+ (gff2 ^. field @"layer2" . weightsL) `approx` l2weightgrad++ it "returns a [3,3,3] input gradient" $ do+ gin `lapprox` replicate 4 (-3)++ where+ eps = 0.0001++ approx :: Tensor d -> Tensor d -> IO ()+ approx = approximately eps++ lapprox :: Tensor d -> [HsReal] -> IO ()+ lapprox = lapproximately eps++ ff2 :: FF2Network 4 6 2+ ff2 = FF2Network+ (Linear (reasonablyUnsafeMatrix $ replicate 4 [ -1, -1, -1, 1, 1, 1], constant 0))+ (Linear (reasonablyUnsafeMatrix $ replicate 6 [-1, 0], constant 0))++ oneInput :: Tensor '[4]+ oneInput = constant 1++ l1weightgrad :: (Tensor '[4, 6])+ l1weightgrad = reasonablyUnsafeMatrix $ replicate 4 [ 0, 0, 0,-1,-1,-1]++ l2weightgrad :: (Tensor '[6, 2])+ l2weightgrad = reasonablyUnsafeMatrix $ replicateN 3+ [ [ 0, 0]+ , [ 4,-4]+ ]++twoLayerOverfit :: Spec+twoLayerOverfit = do+ net0 <- runIO $ do+ g <- newRNG+ manualSeed g 1+ l0 <- (Linear . (,constant 1)) <$> uniform g rg+ l1 <- (Linear . (,constant 1)) <$> uniform g rg+ pure (l0, l1)++ it "returns around 50-50 on uniform random initialization" . void $ do+ let [l0, r0] = tensordata $ infer net0+ let pointapprox pred truth = Prelude.abs (pred - truth) < 0.3+ (l0, r0) `shouldSatisfy` (\(px, py) -> pointapprox px 0.5 && pointapprox py 0.5)++ it "backprops to yield a loss smaller than its prior" . void $ do+ let [l0, r0] = tensordata $ infer net0+ let lr = (-0.001) :: HsReal+ let (o, _) = bprop net0+ (fnet, (fo, fl, fr)) <-+ foldlM (\(net, (o, l, r)) i -> do+ let (o, (Linear (gw0, gb0), Linear (gw1, gb1))) = bprop net+ let net' = B.add net (Linear (gw0 ^* lr, gb0 ^* lr), Linear (gw1 ^* lr, gb1 ^* lr))+ let (o', grad') = bprop net'+ let [l', r'] = tensordata $ infer net'+ o `shouldSatisfy` (> o')+ pure (net', (o', l', r'))+ ) (net0, (o, l0, r0)) [1..100]+ let pointapprox pred truth = Prelude.abs (pred - truth) < 0.01+ (fl, fr) `shouldSatisfy` (\(px, py) -> pointapprox px 0.0 && pointapprox py 1.0)++ where+ Just rg = ord2Tuple (-1, 1)++ x :: Tensor '[4]+ x = constant 1++ answer :: Tensor '[2]+ answer = reasonablyUnsafeVector [0,1]++ arch :: Reifies s W => BVar s (Linear 4 6, Linear 6 2) -> BVar s (Tensor '[4]) -> BVar s (Tensor '[2])+ arch arch inp+ = linear (arch ^^. _1) inp+ & relu+ & linear (arch ^^. _2)+ & softmax++ infer :: (Linear 4 6, Linear 6 2) -> Tensor '[2]+ infer net = evalBP2 arch net x++ bprop net = (fromJust $ get1d o 0, g)+ where+ (o, (g, _)) = backprop2 (bCECriterion answer .: arch) net x++++oneLayerOverfit :: Spec+oneLayerOverfit = do+ net0 <- runIO (newRNG >>= \g -> manualSeed g 1 >> (Linear . (,constant 1)) <$> uniform g rg)+ it "returns around 50-50 on uniform random initialization" . void $ do+ let [l0, r0] = tensordata $ infer net0+ let pointapprox pred truth = Prelude.abs (pred - truth) < 0.3+ (l0, r0) `shouldSatisfy` (\(px, py) -> pointapprox px 0.5 && pointapprox py 0.5)++ it "backprops to yield a loss smaller than its prior" . void $ do+ let [l0, r0] = tensordata $ infer net0+ let lr = (-0.1) :: HsReal+ let (o, _) = bprop net0+ (fnet, (fo, fl, fr)) <-+ foldlM (\(net, (o, l, r)) i -> do+ let (o, Linear (gw, gb)) = bprop net+ let net' = B.add net (Linear (gw ^* lr, gb ^* lr))+ let (o', grad') = bprop net'+ let [l', r'] = tensordata $ infer net'+ o `shouldSatisfy` (> o')+ pure (net', (o', l', r'))+ ) (net0, (o, l0, r0)) [1..100]+ let pointapprox pred truth = Prelude.abs (pred - truth) < 0.01+ (fl, fr) `shouldSatisfy` (\(px, py) -> pointapprox px 0.0 && pointapprox py 1.0)++ where+ Just rg = ord2Tuple (-1, 1)++ x :: Tensor '[6]+ x = constant 1++ answer :: Tensor '[2]+ answer = (reasonablyUnsafeVector [0,1])++ arch :: Reifies s W => BVar s (Linear 6 2) -> BVar s (Tensor '[6]) -> BVar s (Tensor '[2])+ arch a b = softmax $ linear a b++ infer :: Linear 6 2 -> Tensor '[2]+ infer net = evalBP2 arch net x++ bprop net = (fromJust $ get1d o 0, g)+ where+ (o, (g, _)) = backprop2 (bCECriterion answer .: arch) net x+++xavierPurityCheck :: forall i o . (KnownDim i, KnownDim o) => Linear i o -> Spec -> Spec+xavierPurityCheck ll tests =+ it (header ++ "initializes with xavier correctly")+ ( weights ll =##= 1/i+ >> bias ll =##= 1/o)+ >> tests+ >> it (header ++ "leaves weights unchanged") (weights ll =##= 1/i)+ >> it (header ++ "leaves bias unchanged") (bias ll =##= 1/o)+ where+ header :: String+ header = "[ref-check] " ++ unwords ["Linear", show (truncate i), show (truncate o)] ++ ": "++ i, o :: Double+ i = fromIntegral (dimVal (dim :: Dim i))+ o = fromIntegral (dimVal (dim :: Dim o))+++_lapproximately :: ([Double] -> Bool) -> Double -> Tensor d -> [Double] -> IO ()+_lapproximately pred e o dist = let os = tensordata o in+ zipWith (Prelude.abs .: subtract) os dist `shouldSatisfy` pred++_approximately :: ([Double] -> Bool) -> Double -> Tensor d -> Tensor d -> IO ()+_approximately pred e o dist = _lapproximately pred e o (tensordata dist)++approximately e = _approximately (all (< e)) e+notCloseTo e = _approximately (all (> e)) e+lapproximately e = _lapproximately (all (< e)) e+lnotCloseTo e = _lapproximately (all (> e)) e++elementsSatisfy :: Tensor d -> ([Double] -> Bool) -> IO ()+elementsSatisfy o pred = tensordata o `shouldSatisfy` pred++replicateN :: Int -> [a] -> [a]+replicateN inner = concatMap (replicate inner)++(=##=) :: Tensor d -> Double -> IO ()+(=##=) o v = elementsSatisfy o (all (== v))++infixl 2 =##=++
+ utils/Torch/Core/Exceptions.hs view
@@ -0,0 +1,109 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Core.Exceptions+-- Copyright : (c) Hasktorch devs 2017+-- License : BSD3+-- Maintainer: Sam Stites <sam@stites.io>+-- Stability : experimental+-- Portability: non-portable+--+-- Package to start off hasktorch exception handling.+--+-- TODO: Move this into a seperate package so that this can be used by+-- 'hasktorch-classes'+-------------------------------------------------------------------------------+{-# LANGUAGE ForeignFunctionInterface #-}+module Torch.Core.Exceptions+ ( TorchException(..)+ , module X+ {-+ , c_testHasktorchLib+ , p_testHasktorchLib+ , c_errorHandler+ , p_errorHandler+ , c_argErrorHandler+ , p_argErrorHandler+ , c_THSetErrorHandler+ -}+ ) where++import Control.Exception.Safe as X+-- import Control.Exception.Base as X (catch)+import Data.Typeable (Typeable)+import Data.Text (Text)++import Foreign+import Foreign.C.String++-- | The base Torch exception class+data TorchException+ = MathException Text+ deriving (Show, Typeable)++instance Exception TorchException++{- Hasktorch error handler -}+{-+foreign import ccall unsafe "error_handler.h testFunction"+ c_testHasktorchLib :: IO ()++foreign import ccall unsafe "error_handler.h &testFunction"+ p_testHasktorchLib :: FunPtr (IO ())++foreign import ccall unsafe "error_handler.h errorHandler"+ c_errorHandler :: CString -> IO ()++foreign import ccall unsafe "error_handler.h &errorHandler"+ p_errorHandler :: FunPtr (CString -> IO ())++foreign import ccall unsafe "error_handler.h argErrorHandler"+ c_argErrorHandler :: CString -> IO ()++foreign import ccall unsafe "error_handler.h &argErrorHandler"+ p_argErrorHandler :: FunPtr (CString -> IO ())++{- THGeneral options to configure error handler -}+++-- TH_API void THSetErrorHandler(THErrorHandlerFunction new_handler, void *data);+foreign import ccall "THGeneral.h.in THSetErrorHandler"+ c_THSetErrorHandler :: FunPtr (CString -> IO ()) -> IO ()+-}+{-+-- TH_API double THLog1p(const double x);+foreign import ccall unsafe "THGeneral.h.in THLog1p"+ c_THLog1p :: CDouble -> CDouble++-- safe version of potrf+-- |c_Torch.FFI.TH.Double.Tensor_potrf : ra_ a uplo -> void+foreign import ccall "THTensorLapack.h Torch.FFI.TH.Double.Tensor_potrf"+ c_safe_Torch.FFI.TH.Double.Tensor_potrf :: (Ptr CTHDoubleTensor) -> (Ptr CTHDoubleTensor) -> Ptr CChar -> IO ()++lapackTest :: IO ()+lapackTest = do+ putStrLn "Setting error handler"+ c_THSetErrorHandler p_errorHandler+ putStrLn "Cholesky decomposition should fail:"+ opt <- newCString "U"+ dims <- Dim.someDimsM [2, 2]+ a <- constant' dims 2++ Gen.c_set2d a 0 0 1.0+ Gen.c_set2d a 0 1 0.0+ Gen.c_set2d a 1 1 (-1.0)+ Gen.c_set2d a 1 0 0.0+ resA <- constant' dims 5.0+ dispRaw a+ c_safe_Torch.FFI.TH.Double.Tensor_potrf resA a opt+ dispRaw a+ -- dispRaw resA -- TODO: what should happen when potrf has an error+ c_Torch.FFI.TH.Double.Tensor_free a+ c_Torch.FFI.TH.Double.Tensor_free resA+ pure ()++test = do+ c_testHasktorchLib+ c_THSetErrorHandler p_errorHandler+ lapackTest+ putStrLn "Done"+ -}
+ utils/Torch/Core/LogAdd.hs view
@@ -0,0 +1,50 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Core.LogAdd+-- Copyright : (c) Hasktorch devs 2017+-- License : BSD3+-- Maintainer: Sam Stites <sam@stites.io>+-- Stability : experimental+-- Portability: non-portable+--+-- Various bindings to 'TH/THLogAdd.c' and haskell variants where possible+-------------------------------------------------------------------------------+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE ScopedTypeVariables #-}+module Torch.Core.LogAdd+ ( logAdd+ , logSub+ , expMinusApprox+ ) where++import Torch.Core.Exceptions+import qualified Torch.FFI.TH.LogAdd as TH++-- | Add two log values, calling out to TH+logAdd :: Double -> Double -> IO Double+logAdd a b = realToFrac <$> TH.c_THLogAdd (realToFrac a) (realToFrac b)++-- | Subtract two log values, calling out to TH+logSub :: Double -> Double -> IO Double+logSub log_a log_b+ | log_a < log_b = throw $ MathException "log_a must be greater than log_b"+ | otherwise = realToFrac <$> TH.c_THLogSub (realToFrac log_a) (realToFrac log_b)++-- | A fast approximation of @exp(-x)@ for positive @x@. Calls out to TH+expMinusApprox :: Double -> IO Double+expMinusApprox a = realToFrac <$> TH.c_THExpMinusApprox (realToFrac a)++-- | A pure version of 'expMinusApprox', transcribing the code from THLogAdd.c to haskell+expMinusApprox' :: forall f . RealFrac f => f -> Maybe f+expMinusApprox' x+ | x < 0 = Nothing+ | x < 13 = Just $ 1 / (y*y*y*y)+ | otherwise = Just 0+ where+ a0, a1, a2, a3, a4 :: f+ a0 = 1+ a1 = 0.125+ a2 = 0.0078125+ a3 = 0.00032552083+ a4 = 1.0172526e-5+ y = a0 + x * (a1 + x * (a2 + x * (a3 + x * a4)))
+ utils/Torch/Core/Random.hs view
@@ -0,0 +1,151 @@+-------------------------------------------------------------------------------+-- |+-- Module : Torch.Core.Random+-- Copyright : (c) Sam Stites 2017+-- License : BSD3+-- Maintainer: sam@stites.io+-- Stability : experimental+-- Portability: non-portable+--+-- Random number generation for single values. FFI over TH/THRandom.h+-------------------------------------------------------------------------------+module Torch.Core.Random+ ( Generator+ , Seed+ , newRNG+ , copy+ , seed+ , manualSeed+ , initialSeed+ , random+ , random64+ , uniform+ , uniformFloat+ , normal+ , exponential+ , standard_gamma+ , cauchy+ , logNormal+ , geometric+ , bernoulli+ ) where++import Foreign (Ptr)+import Foreign.ForeignPtr (ForeignPtr, withForeignPtr, newForeignPtr)+import Data.Word++import Torch.Types.TH+import qualified Torch.FFI.TH.Random as TH++-- ========================================================================= --+-- helpers+-- ========================================================================= --++asRNG :: Ptr C'THGenerator -> IO Generator+asRNG = fmap Generator . newForeignPtr TH.p_THGenerator_free++with2RNGs :: (Ptr C'THGenerator -> Ptr C'THGenerator -> IO x) -> Generator -> Generator -> IO x+with2RNGs fn g0 g1 = _with2RNGs g0 g1 fn++_with2RNGs :: Generator -> Generator -> (Ptr C'THGenerator -> Ptr C'THGenerator -> IO x) -> IO x+_with2RNGs g0 g1 fn = _withRNG g0 (\g0' -> _withRNG g1 (\g1' -> fn g0' g1'))++withRNG :: (Ptr C'THGenerator -> IO x) -> Generator -> IO x+withRNG fn g = withForeignPtr (rng g) fn++_withRNG :: Generator -> (Ptr C'THGenerator -> IO x) -> IO x+_withRNG = flip withRNG++-- ========================================================================= --++-- | Construct a new 'Generator'+newRNG :: IO Generator+newRNG = TH.c_THGenerator_new >>= asRNG++-- | Copy a 'Generator' state to a new generator+copy :: Generator -> Generator -> IO Generator+copy g0 g1 = (with2RNGs TH.c_THGenerator_copy g0 g1) >>= asRNG++-- | Get the current 'Seed' of a 'Generator'+seed :: Generator -> IO Seed+seed = withRNG (fmap fromIntegral . TH.c_THRandom_seed)++-- | Manually set the seed 'Seed' of a 'Generator'+manualSeed :: Generator -> Seed -> IO ()+manualSeed g s = _withRNG g $ \p -> TH.c_THRandom_manualSeed p (fromIntegral s)++-- | Get the first 'Seed' that initialized a given 'Generator'+initialSeed :: Generator -> IO Seed+initialSeed = withRNG (fmap fromIntegral . TH.c_THRandom_initialSeed)++random :: Generator -> IO Seed+random = withRNG (fmap fromIntegral . TH.c_THRandom_random)++random64 :: Generator -> IO Seed+random64 = withRNG (fmap fromIntegral . TH.c_THRandom_random64)++-- | Returns a random double according to uniform distribution on [a,b).+uniform+ :: Generator+ -> Double -- ^ lower bound+ -> Double -- ^ upper bound+ -> IO Double+uniform g a b = _withRNG g $ \p -> realToFrac <$> TH.c_THRandom_uniform p (realToFrac a) (realToFrac b)++-- | Returns a random float according to uniform distribution on [a,b).+uniformFloat+ :: Generator+ -> Float -- ^ lower bound+ -> Float -- ^ upper bound+ -> IO Float+uniformFloat g a b = _withRNG g $ \p -> realToFrac <$> TH.c_THRandom_uniformFloat p (realToFrac a) (realToFrac b)++-- | Returns a random real number according to a normal distribution with the given mean and standard deviation stdv. stdv must be positive, but this is not yet enforced.+--+-- TODO: add a @newtype Pos a = Pos { getPos :: a }@ package with a smart constructor export+normal+ :: Generator+ -> Double -- ^ mean+ -> Double -- ^ stddev (must be positive)+ -> IO Double+normal g a b = _withRNG g $ \p -> realToFrac <$> TH.c_THRandom_normal p (realToFrac a) (realToFrac b)++-- | Returns a random real number according to the exponential distribution @p(x) = lambda * exp(-lambda * x)@+exponential :: Generator -> Double -> IO Double+exponential g a = _withRNG g $ \p -> realToFrac <$> TH.c_THRandom_exponential p (realToFrac a)++standard_gamma :: Generator -> Double -> IO Double+standard_gamma g a = _withRNG g $ \p -> realToFrac <$> TH.c_THRandom_standard_gamma p (realToFrac a)++-- | Returns a random real number according to the Cauchy distribution @p(x) = sigma/(pi*(sigma^2 + (x-median)^2))@+cauchy+ :: Generator+ -> Double -- ^ median+ -> Double -- ^ sigma+ -> IO Double+cauchy g a b = _withRNG g $ \p -> realToFrac <$> TH.c_THRandom_cauchy p (realToFrac a) (realToFrac b)++-- | Returns a random real number according to the log-normal distribution, with the given mean and+-- standard deviation stdv. mean and stdv are the corresponding mean and standard deviation of the+-- underlying normal distribution, and not of the returned distribution.+--+-- stdv must be positive.+logNormal+ :: Generator+ -> Double -- ^ mean+ -> Double -- ^ stddev (must be positive)+ -> IO Double+logNormal g a b = _withRNG g $ \p -> realToFrac <$> TH.c_THRandom_logNormal p (realToFrac a) (realToFrac b)++-- | Returns a random integer number according to a geometric distribution+-- @p(i) = (1-p) * p^(i-1)@. p must satisfy 0 < p < 1.+geometric :: Generator -> Double -> IO Int+geometric g a = _withRNG g $ \p -> fromIntegral <$> TH.c_THRandom_geometric p (realToFrac a)++-- | Returns 1 with probability p and 0 with probability 1-p. p must satisfy 0 <= p <= 1.+--+-- TODO: By default p is equal to 0.5 -- this isn't encoded in the API+bernoulli :: Generator -> Double -> IO Int+bernoulli g a = _withRNG g $ \p -> fromIntegral <$> TH.c_THRandom_bernoulli p (realToFrac a)++