mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-23 11:29:43 +01:00
49 lines
1.5 KiB
Text
49 lines
1.5 KiB
Text
|
-- Hoogle documentation, generated by Haddock
|
||
|
-- See Hoogle, http://www.haskell.org/hoogle/
|
||
|
|
||
|
|
||
|
-- | Code generation for TensorFlow operations.
|
||
|
--
|
||
|
-- Please see README.md
|
||
|
@package tensorflow-opgen
|
||
|
@version 0.1.0.0
|
||
|
|
||
|
|
||
|
-- | Wrapping of TensorFlow attributes into Haskell entities.
|
||
|
module TensorFlow.OpGen.AttrVal
|
||
|
data AttrDef
|
||
|
data AttrCase f
|
||
|
AttrBytes :: (f ByteString) -> AttrCase f
|
||
|
AttrInt64 :: (f Int64) -> AttrCase f
|
||
|
AttrFloat :: (f Float) -> AttrCase f
|
||
|
AttrBool :: (f Bool) -> AttrCase f
|
||
|
AttrType :: (f DataType) -> AttrCase f
|
||
|
AttrShape :: (f TensorShapeProto) -> AttrCase f
|
||
|
|
||
|
-- | Type-reified representation of TensorFlow AttrDef. Initially limited
|
||
|
-- to just the types in Op descriptors.
|
||
|
data AttrTemplate
|
||
|
AttrSingle :: (AttrCase Template) -> AttrTemplate
|
||
|
AttrList :: (AttrCase []) -> AttrTemplate
|
||
|
AttrTensor :: UnusedTensor -> AttrTemplate
|
||
|
|
||
|
-- | Specifies the optional default value and a set of allowed values for
|
||
|
-- the given type.
|
||
|
data Template a
|
||
|
attrDef :: OpDef'AttrDef -> AttrDef
|
||
|
attrOriginal :: Lens' AttrDef OpDef'AttrDef
|
||
|
attrTemplate :: Lens' AttrDef AttrTemplate
|
||
|
templateDefault :: Lens' (Template a) (Maybe a)
|
||
|
templateRestrictions :: Lens' (Template a) [a]
|
||
|
|
||
|
|
||
|
-- | Rendering of TensorFlow operations as Haskell functions.
|
||
|
module TensorFlow.OpGen
|
||
|
data OpGenFlags
|
||
|
OpGenFlags :: String -> String -> String -> OpGenFlags
|
||
|
[outputFile] :: OpGenFlags -> String
|
||
|
[prefix] :: OpGenFlags -> String
|
||
|
[excludeList] :: OpGenFlags -> String
|
||
|
docOpList :: OpGenFlags -> OpList -> Doc
|
||
|
flagParser :: Parser OpGenFlags
|