-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | TensorBoard related functionality. -- -- Please see README.md @package tensorflow-logging @version 0.2.0.0 -- | TensorBoard Summary generation. Provides type safe wrappers around raw -- string emitting CoreOps. -- -- Example use: -- --
-- -- Call summary functions while constructing the graph. -- createModel = do -- loss <- -- ... -- TF.scalarSummary loss -- -- -- Write summaries to an EventWriter. -- train = TF.withEventWriter "/path/to/logs" $ \eventWriter -> do -- summaryTensor <- TF.build TF.allSummaries -- forM_ [1..] $ \step -> do -- if (step % 100 == 0) -- then do -- ((), summaryBytes) <- TF.run (trainStep, summaryTensor) -- let summary = decodeMessageOrDie (TF.unScalar summaryBytes) -- TF.logSummary eventWriter step summary -- else TF.run_ trainStep --module TensorFlow.Logging -- | Handle for logging TensorBoard events safely from multiple threads. data EventWriter -- | Writes Event protocol buffers to event files. withEventWriter :: (MonadIO m, MonadMask m) => FilePath -> (EventWriter -> m a) -> m a -- | Logs the given Event protocol buffer. logEvent :: MonadIO m => EventWriter -> Event -> m () -- | Logs the graph for the given Build action. logGraph :: MonadIO m => EventWriter -> Build a -> m () -- | Logs the given Summary event with an optional global step (use 0 if -- not applicable). logSummary :: MonadIO m => EventWriter -> Int64 -> Summary -> m () -- | Synonym for the tensors that return serialized Summary proto. type SummaryTensor = Tensor Value ByteString -- | Adds a histogramSummary node. The tag argument is intentionally -- limited to a single value for simplicity. histogramSummary :: (MonadBuild m, TensorType t, t /= ByteString, t /= Bool) => ByteString -> Tensor v t -> m () -- | Adds a imageSummary node. The tag argument is intentionally -- limited to a single value for simplicity. imageSummary :: (OneOf '[Word8, Word16, Float] t, MonadBuild m) => ByteString -> Tensor v t -> m () -- | Adds a scalarSummary node. scalarSummary :: (TensorType t, t /= ByteString, t /= Bool, MonadBuild m) => ByteString -> Tensor v t -> m () -- | Merge all summaries accumulated in the Build into one summary. mergeAllSummaries :: MonadBuild m => m SummaryTensor