Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data PyString = PyString {
- variables :: [String]
- expression :: String
- toRunnableString :: PyString -> String
- class ListDimension a where
- genPyType :: [Integer] -> Type
- genPyExp :: Show a => a -> Exp
- pyConst1 :: [Integer] -> ExpQ
- pyConst2 :: [[Integer]] -> ExpQ
- pyConst3 :: [[[Integer]]] -> ExpQ
- pyConst4 :: [[[[Integer]]]] -> ExpQ
- pyConst :: (Show a, ListDimension a) => a -> ExpQ
Documentation
PyString | |
|
toRunnableString :: PyString -> String Source #
class ListDimension a where Source #
Get dimensions of list
>>>
listDim [1]
[1]>>>
listDim [[1]]
[1,1]>>>
listDim [[1,2]]
[1,2]>>>
listDim [[1,2],[1,2]]
[2,2]
ListDimension Integer Source # | |
ListDimension a => ListDimension [a] Source # | |
pyConst1 :: [Integer] -> ExpQ Source #
Gen tensorflow constant expression
$(pyConst1 [3]) means (Tensor "tf.constant([3])" :: Tensor '[1] PyString) $(pyConst1 [3,3]) means (Tensor "tf.constant([3,3])" :: Tensor '[2] PyString) $(pyConst2 [[3,3],[3,3]]) means (Tensor "tf.constant([[3,3],[3,3]])" :: Tensor '[2,2] PyString)