Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Session a
- data SessionOption
- sessionConfig :: ConfigProto -> SessionOption
- sessionTarget :: ByteString -> SessionOption
- runSession :: Session a -> IO a
- runSessionWithOptions :: [SessionOption] -> Session a -> IO a
- build :: Build a -> Session a
- buildAnd :: (a -> Session b) -> Build a -> Session b
- buildWithSummary :: forall a. Build a -> Session (a, [SummaryTensor])
- extend :: Session ()
- addGraphDef :: GraphDef -> Build ()
- run :: Fetchable t a => t -> Session a
- runWithFeeds :: Fetchable t a => [Feed] -> t -> Session a
- run_ :: Nodes t => t -> Session ()
- runWithFeeds_ :: Nodes t => [Feed] -> t -> Session ()
- asyncProdNodes :: Nodes t => t -> Session ()
Documentation
Opaque value created via sessionConfig
and sessionTarget
.
data SessionOption Source
Setting of an option for the session (see runSessionWithOptions
).
sessionConfig :: ConfigProto -> SessionOption Source
Uses the specified config for the created session.
sessionTarget :: ByteString -> SessionOption Source
Target can be: "local", ip:port, host:port. The set of supported factories depends on the linked in libraries. REQUIRES "/learningbrain/public:tensorflow_remote" dependency for the binary.
runSession :: Session a -> IO a Source
Run Session
actions in a new TensorFlow session.
runSessionWithOptions :: [SessionOption] -> Session a -> IO a Source
Run Session
actions in a new TensorFlow session created with
the given option setter actions (sessionTarget
, sessionConfig
).
buildAnd :: (a -> Session b) -> Build a -> Session b Source
Helper combinator for doing something with the result of a Build
action.
Example usage:
buildAnd run :: Fetchable t a => Build t -> Session a
buildWithSummary :: forall a. Build a -> Session (a, [SummaryTensor]) Source
Add all pending rendered nodes to the TensorFlow graph and runs any pending initializers.
Note that run, runWithFeeds, etc. will all call this function implicitly.
addGraphDef :: GraphDef -> Build () Source
run :: Fetchable t a => t -> Session a Source
Run a subgraph t
, rendering any dependent nodes that aren't already
rendered, and fetch the corresponding values for a
.
runWithFeeds :: Fetchable t a => [Feed] -> t -> Session a Source
Run a subgraph t
, rendering any dependent nodes that aren't already
rendered, feed the given input values, and fetch the corresponding result
values for a
.
run_ :: Nodes t => t -> Session () Source
Run a subgraph t
, rendering and extending any dependent nodes that aren't
already rendered. This behaves like run
except that it doesn't do any
fetches.
runWithFeeds_ :: Nodes t => [Feed] -> t -> Session () Source
Run a subgraph t
, rendering any dependent nodes that aren't already
rendered, feed the given input values, and fetch the corresponding result
values for a
. This behaves like runWithFeeds
except that it doesn't do
any fetches.
Starts a concurrent thread which evaluates the given Nodes forever until runSession exits or an exception occurs. Graph extension happens synchronously, but the resultant run proceeds as a separate thread.