Copyright | (c) 2016-2017 Tao He |
---|---|
License | MIT |
Maintainer | sighingnow@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Symbol module.
- newtype Symbol a = Symbol {}
- variable :: DType a => String -> IO (Symbol a)
- getName :: DType a => Symbol a -> IO String
- getAttr :: DType a => Symbol a -> String -> IO (Maybe String)
- setAttr :: DType a => Symbol a -> String -> String -> IO ()
- infershape :: DType a => Symbol a -> [String] -> IO ([[Int]], [[Int]], [[Int]])
- grad :: DType a => Symbol a -> [String] -> IO (Symbol a)
- bind :: DType a => Symbol a -> Context -> HashMap String (NDArray a) -> IO (Executor a)
- bind' :: DType a => Symbol a -> Context -> [NDArray a] -> IO (Executor a)
- listInputs :: DType a => Symbol a -> IO [String]
- listOutputs :: DType a => Symbol a -> IO [String]
- listAuxiliaries :: DType a => Symbol a -> IO [String]
- symid :: IORef Int
- naming :: String -> IO String
Documentation
Type alias for variable.
Make a new symbolic variable with given name.
getAttr :: DType a => Symbol a -> String -> IO (Maybe String) Source #
Get specified attribute of symbol.
setAttr :: DType a => Symbol a -> String -> String -> IO () Source #
Set specified attribute of symbol.
infershape :: DType a => Symbol a -> [String] -> IO ([[Int]], [[Int]], [[Int]]) Source #
Infer the shape of the given symbol, return the in, out and auxiliary shape size.
grad :: DType a => Symbol a -> [String] -> IO (Symbol a) Source #
Get the autodiff of current symbol. This function can only be used if current symbol is a loss function.
bind :: DType a => Symbol a -> Context -> HashMap String (NDArray a) -> IO (Executor a) Source #
Bind with explicit argument mapping (name -- value mapping).