Safe Haskell | None |
---|---|
Language | Haskell2010 |
Extensions to Torch
Synopsis
- foldLoop' :: Int -> (a -> Int -> IO a) -> a -> IO a
- nanToNum :: Float -> Float -> Float -> Tensor -> Tensor
- nanToNum' :: Tensor -> Tensor
- nanToNum'' :: Tensor -> Tensor
- fullLike' :: Tensor -> Float -> Tensor
- indexSelect'' :: Int -> [Int] -> Tensor -> Tensor
- where'' :: Tensor -> (Tensor -> Tensor) -> Tensor -> Tensor
- repeatInterleave' :: Int -> Tensor -> Tensor -> Tensor
- splitDim :: Int -> Tensor -> [Tensor]
- boolMask :: Int -> [Int] -> Tensor
- boolMask' :: Int -> Tensor -> Tensor
- manualSeed :: Int -> IO ()
- currentSeed :: IO Int
- gpu :: Device
- cpu :: Device
- dataType :: DType
- toTensor :: TensorLike a => a -> Tensor
- toTensor' :: TensorLike a => a -> Tensor
- toIntTensor :: TensorLike a => a -> Tensor
- toIntTensor' :: TensorLike a => a -> Tensor
- empty :: Tensor
- empty' :: Tensor
- toScalar :: Float -> Tensor
- toScalar' :: Float -> Tensor
- toDouble :: forall a. HasTypes a Tensor => a -> a
- toDouble' :: forall a. HasTypes a Tensor => a -> a
- toFloat :: forall a. HasTypes a Tensor => a -> a
- toFloat' :: forall a. HasTypes a Tensor => a -> a
- randomInts :: Int -> Int -> Int -> IO Tensor
- randomInts' :: Int -> Int -> Int -> IO Tensor
- normal' :: [Int] -> IO Tensor
- uniform' :: [Int] -> Float -> Float -> IO Tensor
- rescale :: Tensor -> Tensor
Documentation
foldLoop' :: Int -> (a -> Int -> IO a) -> a -> IO a Source #
Swaps the arguments of HaskTorch's foldLoop around
where'' :: Tensor -> (Tensor -> Tensor) -> Tensor -> Tensor Source #
Torch.where' with fixed type for where'
repeatInterleave' :: Int -> Tensor -> Tensor -> Tensor Source #
Syntactic sugar for HaskTorch's repeatInterleave
so it can more easily
be fmapped.
splitDim :: Int -> Tensor -> [Tensor] Source #
Helper function creating split indices as gpu int tensor splits' :: [Int] -> [T.Tensor] splits' = map tit . splits where tit i = T.asTensor (i :: Int)
Split Tensor into list of Tensors along dimension
manualSeed :: Int -> IO () Source #
Manually set RNG Seed
currentSeed :: IO Int Source #
Get the current RNG Seed
toTensor :: TensorLike a => a -> Tensor Source #
Convert an Array to a Tensor on GPU
toTensor' :: TensorLike a => a -> Tensor Source #
Convert an Array to a Tensor on CPU
toIntTensor :: TensorLike a => a -> Tensor Source #
Convert an Array to a Tensor on GPU
toIntTensor' :: TensorLike a => a -> Tensor Source #
Convert an Array to a Tensor on CPU