maryBytes) &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"><details id="syn"><summary>Synopsis</summary><ul class="details-toggle" data-details-id="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">withEventWrit