Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type FactoryType = ForeignPtr IntArray -> ForeignPtr TensorOptions -> IO (ForeignPtr Tensor)
- type FactoryTypeWithDimnames = ForeignPtr IntArray -> ForeignPtr DimnameList -> ForeignPtr TensorOptions -> IO (ForeignPtr Tensor)
- mkFactory :: FactoryType -> [Int] -> TensorOptions -> IO Tensor
- mkFactoryUnsafe :: FactoryType -> [Int] -> TensorOptions -> Tensor
- mkFactoryWithDimnames :: FactoryTypeWithDimnames -> [(Int, Dimname)] -> TensorOptions -> IO Tensor
- mkFactoryUnsafeWithDimnames :: FactoryTypeWithDimnames -> [(Int, Dimname)] -> TensorOptions -> Tensor
- mkDefaultFactory :: ([Int] -> TensorOptions -> a) -> [Int] -> a
- mkDefaultFactoryWithDimnames :: ([(Int, Dimname)] -> TensorOptions -> a) -> [(Int, Dimname)] -> a
- ones :: [Int] -> TensorOptions -> Tensor
- onesLike :: Tensor -> Tensor
- zeros :: [Int] -> TensorOptions -> Tensor
- zerosLike :: Tensor -> Tensor
- randIO :: [Int] -> TensorOptions -> IO Tensor
- randnIO :: [Int] -> TensorOptions -> IO Tensor
- randintIO :: Int -> Int -> [Int] -> TensorOptions -> IO Tensor
- randnLikeIO :: Tensor -> IO Tensor
- randLikeIO :: Tensor -> TensorOptions -> IO Tensor
- fullLike :: Tensor -> Float -> TensorOptions -> IO Tensor
- onesWithDimnames :: [(Int, Dimname)] -> TensorOptions -> Tensor
- zerosWithDimnames :: [(Int, Dimname)] -> TensorOptions -> Tensor
- randWithDimnames :: [(Int, Dimname)] -> TensorOptions -> IO Tensor
- randnWithDimnames :: [(Int, Dimname)] -> TensorOptions -> IO Tensor
- linspace :: (Scalar a, Scalar b) => a -> b -> Int -> TensorOptions -> Tensor
- logspace :: (Scalar a, Scalar b) => a -> b -> Int -> Double -> TensorOptions -> Tensor
- eyeSquare :: Int -> TensorOptions -> Tensor
- eye :: Int -> Int -> TensorOptions -> Tensor
- full :: Scalar a => [Int] -> a -> TensorOptions -> Tensor
- sparseCooTensor :: Tensor -> Tensor -> [Int] -> TensorOptions -> Tensor
- ones' :: [Int] -> Tensor
- zeros' :: [Int] -> Tensor
- randIO' :: [Int] -> IO Tensor
- randnIO' :: [Int] -> IO Tensor
- randintIO' :: Int -> Int -> [Int] -> IO Tensor
- randLikeIO' :: Tensor -> IO Tensor
- bernoulliIO' :: Tensor -> IO Tensor
- bernoulliIO :: Tensor -> Double -> IO Tensor
- poissonIO :: Tensor -> IO Tensor
- multinomialIO' :: Tensor -> Int -> IO Tensor
- multinomialIO :: Tensor -> Int -> Bool -> IO Tensor
- normalIO' :: Tensor -> IO Tensor
- normalIO :: Tensor -> Tensor -> IO Tensor
- normalScalarIO :: Tensor -> Double -> IO Tensor
- normalScalarIO' :: Double -> Tensor -> IO Tensor
- normalWithSizeIO :: Double -> Double -> Int -> IO Tensor
- rreluIO''' :: Tensor -> IO Tensor
- rreluIO'' :: Scalar a => Tensor -> a -> IO Tensor
- rreluIO' :: Scalar a => Tensor -> a -> a -> IO Tensor
- rreluIO :: Scalar a => Tensor -> a -> a -> Bool -> IO Tensor
- rreluWithNoiseIO''' :: Tensor -> Tensor -> IO Tensor
- rreluWithNoiseIO'' :: Scalar a => Tensor -> Tensor -> a -> IO Tensor
- rreluWithNoiseIO' :: Scalar a => Tensor -> Tensor -> a -> a -> IO Tensor
- rreluWithNoiseIO :: Scalar a => Tensor -> Tensor -> a -> a -> Bool -> IO Tensor
- onesWithDimnames' :: [(Int, Dimname)] -> Tensor
- zerosWithDimnames' :: [(Int, Dimname)] -> Tensor
- randWithDimnames' :: [(Int, Dimname)] -> IO Tensor
- randnWithDimnames' :: [(Int, Dimname)] -> IO Tensor
- linspace' :: (Scalar a, Scalar b) => a -> b -> Int -> Tensor
- logspace' :: (Scalar a, Scalar b) => a -> b -> Int -> Double -> Tensor
- eyeSquare' :: Int -> Tensor
- eye' :: Int -> Int -> Tensor
- full' :: Scalar a => [Int] -> a -> Tensor
- sparseCooTensor' :: Tensor -> Tensor -> [Int] -> Tensor
- arange :: Int -> Int -> Int -> TensorOptions -> Tensor
- arange' :: Int -> Int -> Int -> Tensor
Documentation
type FactoryType = ForeignPtr IntArray -> ForeignPtr TensorOptions -> IO (ForeignPtr Tensor) Source #
type FactoryTypeWithDimnames = ForeignPtr IntArray -> ForeignPtr DimnameList -> ForeignPtr TensorOptions -> IO (ForeignPtr Tensor) Source #
:: FactoryType | aten_impl |
-> [Int] | shape |
-> TensorOptions | opts |
-> IO Tensor | output |
mkFactoryUnsafe :: FactoryType -> [Int] -> TensorOptions -> Tensor Source #
mkFactoryWithDimnames :: FactoryTypeWithDimnames -> [(Int, Dimname)] -> TensorOptions -> IO Tensor Source #
mkFactoryUnsafeWithDimnames :: FactoryTypeWithDimnames -> [(Int, Dimname)] -> TensorOptions -> Tensor Source #
mkDefaultFactory :: ([Int] -> TensorOptions -> a) -> [Int] -> a Source #
mkDefaultFactoryWithDimnames :: ([(Int, Dimname)] -> TensorOptions -> a) -> [(Int, Dimname)] -> a Source #
:: [Int] | sequence of integers defining the shape of the output tensor. |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> Tensor | output |
Returns a tensor filled with the scalar value 1, with the shape defined by the variable argument size.
Returns a tensor filled with the scalar value 1, with the same size as input tensor
:: [Int] | sequence of integers defining the shape of the output tensor. |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> Tensor | output |
Returns a tensor filled with the scalar value 0, with the shape defined by the variable argument size.
Returns a tensor filled with the scalar value 0, with the same size as input tensor
:: [Int] | sequence of integers defining the shape of the output tensor. |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> IO Tensor | output |
Returns a tensor filled with random numbers from a uniform distribution on the interval [0,1)
:: [Int] | sequence of integers defining the shape of the output tensor. |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> IO Tensor | output |
Returns a tensor filled with random numbers from a standard normal distribution.
:: Int | lowest integer to be drawn from the distribution. Default: 0. |
-> Int | one above the highest integer to be drawn from the distribution. |
-> [Int] | the shape of the output tensor. |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> IO Tensor | output |
Returns a tensor filled with random integers generated uniformly between low (inclusive) and high (exclusive).
Returns a tensor with the same size as input that is filled with random numbers from standard normal distribution.
:: Tensor | input |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> IO Tensor | output |
Returns a tensor with the same size as input that is filled with random numbers from a uniform distribution on the interval [0,1).
onesWithDimnames :: [(Int, Dimname)] -> TensorOptions -> Tensor Source #
zerosWithDimnames :: [(Int, Dimname)] -> TensorOptions -> Tensor Source #
randWithDimnames :: [(Int, Dimname)] -> TensorOptions -> IO Tensor Source #
randnWithDimnames :: [(Int, Dimname)] -> TensorOptions -> IO Tensor Source #
:: (Scalar a, Scalar b) | |
=> a | start |
-> b | end |
-> Int | steps |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> Tensor | output |
Returns a one-dimensional tensor of steps equally spaced points between start and end.
:: Int | the number of rows |
-> Int | the number of columns |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> Tensor | output |
Returns a 2-D tensor with ones on the diagonal and zeros elsewhere.
:: Scalar a | |
=> [Int] | the shape of the output tensor. |
-> a | the number to fill the output tensor with |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> Tensor | output |
Returns a tensor of given size filled with fill_value.
:: Tensor | The indices are the coordinates of the non-zero values in the matrix |
-> Tensor | Initial values for the tensor. |
-> [Int] | the shape of the output tensor. |
-> TensorOptions | |
-> Tensor | output |
Constructs a sparse tensors in COO(rdinate) format with non-zero elements at the given indices with the given values.
eyeSquare' :: Int -> Tensor Source #
:: Int | start |
-> Int | end |
-> Int | step |
-> TensorOptions | configures the data type, device, layout and other properties of the resulting tensor. |
-> Tensor | output |
Returns a 1-D tensor with values from the interval [start, end) taken with common difference step beginning from start.