mathflow-0.1.0.0: Dependently typed tensorflow modeler

Safe HaskellNone
LanguageHaskell2010

MathFlow.PyString

Synopsis

Documentation

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]

Minimal complete definition

listDim

Methods

listDim :: a -> [Integer] Source #

genPyExp :: Show a => a -> Exp 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)

pyConst4 :: [[[[Integer]]]] -> ExpQ Source #