Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Session a
- data Options
- sessionConfig :: Lens' Options ConfigProto
- sessionTarget :: Lens' Options ByteString
- sessionTracer :: Lens' Options Tracer
- runSession :: Session a -> IO a
- runSessionWithOptions :: Options -> Session a -> IO a
- class Monad m => MonadBuild m where
- extend :: Session ()
- addGraphDef :: MonadBuild m => GraphDef -> m ()
- 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
data Session a
data Options
Customization for session. Use the lenses to update:
sessionTarget
, sessionTracer
, sessionConfig
.
Default Options |
sessionConfig :: Lens' Options ConfigProto
Uses the specified config for the created session.
sessionTarget :: Lens' Options ByteString
Target can be: "local", ip:port, host:port. The set of supported factories depends on the linked in libraries.
sessionTracer :: Lens' Options Tracer
Uses the given logger to monitor session progress.
runSession :: Session a -> IO a
Run Session
actions in a new TensorFlow session.
runSessionWithOptions :: Options -> Session a -> IO a
Run Session
actions in a new TensorFlow session created with
the given option setter actions (sessionTarget
, sessionConfig
).
class Monad m => MonadBuild m where
Lift a Build
action into a monad, including any explicit op renderings.
MonadBuild Session | |
Monad m => MonadBuild (BuildT m) |
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 :: MonadBuild m => GraphDef -> m ()
run :: Fetchable t a => t -> Session a
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
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 ()
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 ()
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.