Copyright | (c) Sam Stites 2017 |
---|---|
License | BSD3 |
Maintainer | sam@stites.io |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Miscellaneous layer functions.
Synopsis
- flattenBP :: (Reifies s W, KnownDim (Product d), Dimensions (d :: [Nat])) => BVar s (Tensor d) -> BVar s (Tensor '[Product d])
- flattenBPBatch :: (Reifies s W, All KnownDim '[Product d, bs], Dimensions d) => Product (bs :+ d) ~ Product '[bs, Product d] => BVar s (Tensor (bs :+ d)) -> BVar s (Tensor '[bs, Product d])
- _sparseLinear_updateOutput :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> IO ()
- _sparseLinear_accGradParameters :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Double -> Double -> IO ()
- _sparseLinear_zeroGradParameters :: Tensor d -> Tensor d -> Tensor d -> IO ()
- _sparseLinear_updateParameters :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Double -> IO ()
- _gatedLinear_updateOutput :: Tensor d -> Tensor d -> Int -> IO ()
- _gatedLinear_updateGradInput :: Tensor d -> Tensor d -> Tensor d -> Int -> IO ()
- _gRUFused_updateOutput :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> IO ()
- _gRUFused_updateGradInput :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> IO ()
- _lSTMFused_updateOutput :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> IO ()
- _lSTMFused_updateGradInput :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> IO ()
Documentation
flattenBP :: (Reifies s W, KnownDim (Product d), Dimensions (d :: [Nat])) => BVar s (Tensor d) -> BVar s (Tensor '[Product d]) Source #
A backpropable flatten
operation
flattenBPBatch :: (Reifies s W, All KnownDim '[Product d, bs], Dimensions d) => Product (bs :+ d) ~ Product '[bs, Product d] => BVar s (Tensor (bs :+ d)) -> BVar s (Tensor '[bs, Product d]) Source #
A backpropable flatten
operation with a batch dimension
_sparseLinear_updateOutput :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> IO () Source #
sparseLinear forward pass (updates the output tensor)
_sparseLinear_accGradParameters :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Double -> Double -> IO () Source #
sparseLinear backward-update (updates the layer and bias tensors). Called accGradParameters
in C to indicate accumulating the gradient parameters.
_sparseLinear_zeroGradParameters :: Tensor d -> Tensor d -> Tensor d -> IO () Source #
sparseLinear zeroGradParameters
_sparseLinear_updateParameters :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Double -> IO () Source #
sparseLinear updateParameters
_gatedLinear_updateOutput :: Tensor d -> Tensor d -> Int -> IO () Source #
gatedLinear forward pass (updates the output tensor)
_gatedLinear_updateGradInput :: Tensor d -> Tensor d -> Tensor d -> Int -> IO () Source #
gatedLinear backward-update (updates the layer and bias tensors)
_gRUFused_updateOutput :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> IO () Source #
gRUFused forward pass (updates the output tensor)
_gRUFused_updateGradInput :: Tensor d -> Tensor d -> Tensor d -> Tensor d -> Tensor d -> IO () Source #
gRUFused backward-update (updates the layer and bias tensors)