1
0
Fork 0
mirror of https://github.com/tensorflow/haskell.git synced 2024-11-15 23:49:43 +01:00
tensorflow-haskell/docs/haddock/tensorflow-logging-0.2.0.0/TensorFlow-Logging.html
2018-08-13 21:05:49 -07:00

22 lines
No EOL
13 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>TensorFlow.Logging</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/TensorFlow.Logging.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">tensorflow-logging-0.2.0.0: TensorBoard related functionality.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">TensorFlow.Logging</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>TensorBoard Summary generation. Provides type safe wrappers around raw
string emitting CoreOps.</p><p>Example use:</p><pre>-- Call summary functions while constructing the graph.
createModel = do
loss &lt;- -- ...
TF.scalarSummary loss
-- Write summaries to an EventWriter.
train = TF.withEventWriter &quot;/path/to/logs&quot; $ \eventWriter -&gt; do
summaryTensor &lt;- TF.build TF.allSummaries
forM_ [1..] $ \step -&gt; do
if (step % 100 == 0)
then do
((), summaryBytes) &lt;- TF.run (trainStep, summaryTensor)
let summary = decodeMessageOrDie (TF.unScalar summaryBytes)
TF.logSummary eventWriter step summary
else TF.run_ trainStep</pre></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:EventWriter">EventWriter</a></li><li class="src short"><a href="#v:withEventWriter">withEventWriter</a> :: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, MonadMask m) =&gt; <a href="../base-4.10.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; (<a href="TensorFlow-Logging.html#t:EventWriter">EventWriter</a> -&gt; m a) -&gt; m a</li><li class="src short"><a href="#v:logEvent">logEvent</a> :: <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="TensorFlow-Logging.html#t:EventWriter">EventWriter</a> -&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Util-Event.html#t:Event">Event</a> -&gt; m ()</li><li class="src short"><a href="#v:logGraph">logGraph</a> :: <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="TensorFlow-Logging.html#t:EventWriter">EventWriter</a> -&gt; <a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:Build">Build</a> a -&gt; m ()</li><li class="src short"><a href="#v:logSummary">logSummary</a> :: <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="TensorFlow-Logging.html#t:EventWriter">EventWriter</a> -&gt; <a href="../base-4.10.1.0/Data-Int.html#t:Int64">Int64</a> -&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-Summary.html#t:Summary">Summary</a> -&gt; m ()</li><li class="src short"><span class="keyword">type</span> <a href="#t:SummaryTensor">SummaryTensor</a> = <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Value">Value</a> <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:histogramSummary">histogramSummary</a> :: (<a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m, <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:TensorType">TensorType</a> t, t <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:-47--61-">/=</a> <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a>, t <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:-47--61-">/=</a> <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a>) =&gt; <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> v t -&gt; m ()</li><li class="src short"><a href="#v:imageSummary">imageSummary</a> :: (<a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:OneOf">OneOf</a> '[<a href="../base-4.10.1.0/Data-Word.html#t:Word8">Word8</a>, <a href="../base-4.10.1.0/Data-Word.html#t:Word16">Word16</a>, <a href="../base-4.10.1.0/Prelude.html#t:Float">Float</a>] t, <a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m) =&gt; <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> v t -&gt; m ()</li><li class="src short"><a href="#v:scalarSummary">scalarSummary</a> :: (<a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:TensorType">TensorType</a> t, t <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:-47--61-">/=</a> <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a>, t <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:-47--61-">/=</a> <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a>, <a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m) =&gt; <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> v t -&gt; m ()</li><li class="src short"><a href="#v:mergeAllSummaries">mergeAllSummaries</a> :: <a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; m <a href="TensorFlow-Logging.html#t:SummaryTensor">SummaryTensor</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:EventWriter" class="def">EventWriter</a> <a href="src/TensorFlow.Logging.html#EventWriter" class="link">Source</a> <a href="#t:EventWriter" class="selflink">#</a></p><div class="doc"><p>Handle for logging TensorBoard events safely from multiple threads.</p></div></div><div class="top"><p class="src"><a id="v:withEventWriter" class="def">withEventWriter</a> <a href="src/TensorFlow.Logging.html#withEventWriter" class="link">Source</a> <a href="#v:withEventWriter" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, MonadMask m)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="../base-4.10.1.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>logdir. Local filesystem directory where event file will be written.</p></td></tr><tr><td class="src">-&gt; (<a href="TensorFlow-Logging.html#t:EventWriter">EventWriter</a> -&gt; m a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; m a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Writes Event protocol buffers to event files.</p></div></div><div class="top"><p class="src"><a id="v:logEvent" class="def">logEvent</a> :: <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="TensorFlow-Logging.html#t:EventWriter">EventWriter</a> -&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Util-Event.html#t:Event">Event</a> -&gt; m () <a href="src/TensorFlow.Logging.html#logEvent" class="link">Source</a> <a href="#v:logEvent" class="selflink">#</a></p><div class="doc"><p>Logs the given Event protocol buffer.</p></div></div><div class="top"><p class="src"><a id="v:logGraph" class="def">logGraph</a> :: <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="TensorFlow-Logging.html#t:EventWriter">EventWriter</a> -&gt; <a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:Build">Build</a> a -&gt; m () <a href="src/TensorFlow.Logging.html#logGraph" class="link">Source</a> <a href="#v:logGraph" class="selflink">#</a></p><div class="doc"><p>Logs the graph for the given <code><a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:Build">Build</a></code> action.</p></div></div><div class="top"><p class="src"><a id="v:logSummary" class="def">logSummary</a> :: <a href="../base-4.10.1.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m =&gt; <a href="TensorFlow-Logging.html#t:EventWriter">EventWriter</a> -&gt; <a href="../base-4.10.1.0/Data-Int.html#t:Int64">Int64</a> -&gt; <a href="../tensorflow-proto-0.2.0.0/Proto-Tensorflow-Core-Framework-Summary.html#t:Summary">Summary</a> -&gt; m () <a href="src/TensorFlow.Logging.html#logSummary" class="link">Source</a> <a href="#v:logSummary" class="selflink">#</a></p><div class="doc"><p>Logs the given Summary event with an optional global step (use 0 if not
applicable).</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:SummaryTensor" class="def">SummaryTensor</a> = <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Value">Value</a> <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a> <a href="#t:SummaryTensor" class="selflink">#</a></p><div class="doc"><p>Synonym for the tensors that return serialized Summary proto.</p></div></div><div class="top"><p class="src"><a id="v:histogramSummary" class="def">histogramSummary</a> :: (<a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m, <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:TensorType">TensorType</a> t, t <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:-47--61-">/=</a> <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a>, t <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:-47--61-">/=</a> <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a>) =&gt; <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> v t -&gt; m () <a href="src/TensorFlow.Logging.html#histogramSummary" class="link">Source</a> <a href="#v:histogramSummary" class="selflink">#</a></p><div class="doc"><p>Adds a <code><a href="../tensorflow-core-ops-0.2.0.0/TensorFlow-GenOps-Core.html#v:histogramSummary">histogramSummary</a></code> node. The tag argument is intentionally
limited to a single value for simplicity.</p></div></div><div class="top"><p class="src"><a id="v:imageSummary" class="def">imageSummary</a> :: (<a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:OneOf">OneOf</a> '[<a href="../base-4.10.1.0/Data-Word.html#t:Word8">Word8</a>, <a href="../base-4.10.1.0/Data-Word.html#t:Word16">Word16</a>, <a href="../base-4.10.1.0/Prelude.html#t:Float">Float</a>] t, <a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m) =&gt; <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> v t -&gt; m () <a href="src/TensorFlow.Logging.html#imageSummary" class="link">Source</a> <a href="#v:imageSummary" class="selflink">#</a></p><div class="doc"><p>Adds a <code><a href="../tensorflow-core-ops-0.2.0.0/TensorFlow-GenOps-Core.html#v:imageSummary">imageSummary</a></code> node. The tag argument is intentionally
limited to a single value for simplicity.</p></div></div><div class="top"><p class="src"><a id="v:scalarSummary" class="def">scalarSummary</a> :: (<a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:TensorType">TensorType</a> t, t <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:-47--61-">/=</a> <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a>, t <a href="../tensorflow-0.2.0.0/TensorFlow-Types.html#t:-47--61-">/=</a> <a href="../base-4.10.1.0/Data-Bool.html#t:Bool">Bool</a>, <a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m) =&gt; <a href="../bytestring-0.10.8.2/Data-ByteString.html#t:ByteString">ByteString</a> -&gt; <a href="../tensorflow-0.2.0.0/TensorFlow-Tensor.html#t:Tensor">Tensor</a> v t -&gt; m () <a href="src/TensorFlow.Logging.html#scalarSummary" class="link">Source</a> <a href="#v:scalarSummary" class="selflink">#</a></p><div class="doc"><p>Adds a <code><a href="../tensorflow-core-ops-0.2.0.0/TensorFlow-GenOps-Core.html#v:scalarSummary">scalarSummary</a></code> node.</p></div></div><div class="top"><p class="src"><a id="v:mergeAllSummaries" class="def">mergeAllSummaries</a> :: <a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:MonadBuild">MonadBuild</a> m =&gt; m <a href="TensorFlow-Logging.html#t:SummaryTensor">SummaryTensor</a> <a href="src/TensorFlow.Logging.html#mergeAllSummaries" class="link">Source</a> <a href="#v:mergeAllSummaries" class="selflink">#</a></p><div class="doc"><p>Merge all summaries accumulated in the <code><a href="../tensorflow-0.2.0.0/TensorFlow-Build.html#t:Build">Build</a></code> into one summary.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.18.1</p></div></body></html>