mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-30 06:49:44 +01:00
307 lines
No EOL
111 KiB
HTML
307 lines
No EOL
111 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><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- Copyright 2016 TensorFlow authors.</span><span>
|
|
</span><a name="line-2"></a><span class="hs-comment">--</span><span>
|
|
</span><a name="line-3"></a><span class="hs-comment">-- Licensed under the Apache License, Version 2.0 (the "License");</span><span>
|
|
</span><a name="line-4"></a><span class="hs-comment">-- you may not use this file except in compliance with the License.</span><span>
|
|
</span><a name="line-5"></a><span class="hs-comment">-- You may obtain a copy of the License at</span><span>
|
|
</span><a name="line-6"></a><span class="hs-comment">--</span><span>
|
|
</span><a name="line-7"></a><span class="hs-comment">-- http://www.apache.org/licenses/LICENSE-2.0</span><span>
|
|
</span><a name="line-8"></a><span class="hs-comment">--</span><span>
|
|
</span><a name="line-9"></a><span class="hs-comment">-- Unless required by applicable law or agreed to in writing, software</span><span>
|
|
</span><a name="line-10"></a><span class="hs-comment">-- distributed under the License is distributed on an "AS IS" BASIS,</span><span>
|
|
</span><a name="line-11"></a><span class="hs-comment">-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span><span>
|
|
</span><a name="line-12"></a><span class="hs-comment">-- See the License for the specific language governing permissions and</span><span>
|
|
</span><a name="line-13"></a><span class="hs-comment">-- limitations under the License.</span><span>
|
|
</span><a name="line-14"></a><span>
|
|
</span><a name="line-15"></a><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
|
|
</span><a name="line-16"></a><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
|
|
</span><a name="line-17"></a><span class="hs-pragma">{-# LANGUAGE GADTs #-}</span><span>
|
|
</span><a name="line-18"></a><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
|
|
</span><a name="line-19"></a><span class="hs-pragma">{-# LANGUAGE TupleSections #-}</span><span>
|
|
</span><a name="line-20"></a><span>
|
|
</span><a name="line-21"></a><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">TensorFlow</span><span class="hs-operator">.</span><span class="hs-identifier">BuildOp</span><span>
|
|
</span><a name="line-22"></a><span> </span><span class="hs-special">(</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-23"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#buildOp"><span class="hs-identifier hs-var">buildOp</span></a><span>
|
|
</span><a name="line-24"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-25"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#pureOp"><span class="hs-identifier hs-var">pureOp</span></a><span>
|
|
</span><a name="line-26"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#eqLengthGuard"><span class="hs-identifier hs-var">eqLengthGuard</span></a><span>
|
|
</span><a name="line-27"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildInputs"><span class="hs-identifier hs-type">BuildInputs</span></a><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-28"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#OpParams"><span class="hs-identifier hs-type">OpParams</span></a><span>
|
|
</span><a name="line-29"></a><span> </span><span class="hs-special">)</span><span>
|
|
</span><a name="line-30"></a><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-31"></a><span>
|
|
</span><a name="line-32"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Control</span><span class="hs-operator">.</span><span class="hs-identifier">Monad</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">liftM2</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">replicateM</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-33"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Control</span><span class="hs-operator">.</span><span class="hs-identifier">Monad</span><span class="hs-operator">.</span><span class="hs-identifier">Reader</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-type">ReaderT</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">runReaderT</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">ask</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-34"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Control</span><span class="hs-operator">.</span><span class="hs-identifier">Monad</span><span class="hs-operator">.</span><span class="hs-identifier">State</span><span class="hs-operator">.</span><span class="hs-identifier">Strict</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-type">State</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">evalState</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">get</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-var">put</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-35"></a><span class="hs-keyword">import</span><span> </span><span class="hs-identifier">Data</span><span class="hs-operator">.</span><span class="hs-identifier">Int</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-type">Int64</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-36"></a><span>
|
|
</span><a name="line-37"></a><span class="hs-keyword">import</span><span> </span><a href="TensorFlow.Build.html"><span class="hs-identifier">TensorFlow</span><span class="hs-operator">.</span><span class="hs-identifier">Build</span></a><span>
|
|
</span><a name="line-38"></a><span class="hs-keyword">import</span><span> </span><a href="TensorFlow.Output.html"><span class="hs-identifier">TensorFlow</span><span class="hs-operator">.</span><span class="hs-identifier">Output</span></a><span>
|
|
</span><a name="line-39"></a><span class="hs-keyword">import</span><span> </span><a href="TensorFlow.Tensor.html"><span class="hs-identifier">TensorFlow</span><span class="hs-operator">.</span><span class="hs-identifier">Tensor</span></a><span>
|
|
</span><a name="line-40"></a><span class="hs-keyword">import</span><span> </span><a href="TensorFlow.Types.html"><span class="hs-identifier">TensorFlow</span><span class="hs-operator">.</span><span class="hs-identifier">Types</span></a><span>
|
|
</span><a name="line-41"></a><span>
|
|
</span><a name="line-42"></a><span class="hs-keyword">data</span><span> </span><a name="ResultState"><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier">ResultState</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a name="ResultState"><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier">ResultState</span></a></a><span> </span><span class="hs-glyph">!</span><a href="TensorFlow.Output.html#OutputIx"><span class="hs-identifier hs-type">OutputIx</span></a><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Int64</span><span class="hs-special">]</span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-identifier hs-type">Show</span><span>
|
|
</span><a name="line-43"></a><span>
|
|
</span><a name="line-44"></a><span class="hs-keyword">type</span><span> </span><a name="Result"><a href="TensorFlow.BuildOp.html#Result"><span class="hs-identifier">Result</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-type">ReaderT</span><span> </span><a href="TensorFlow.Output.html#NodeName"><span class="hs-identifier hs-type">NodeName</span></a><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-type">State</span><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-type">ResultState</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-45"></a><span>
|
|
</span><a name="line-46"></a><span class="hs-comment">-- | Class of types that can be used as op outputs.</span><span>
|
|
</span><a name="line-47"></a><span class="hs-keyword">class</span><span> </span><a name="BuildResult"><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier">BuildResult</span></a></a><span> </span><a name="local-6989586621679125144"><a href="#local-6989586621679125144"><span class="hs-identifier">a</span></a></a><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-48"></a><span> </span><span class="hs-identifier">buildResult</span><span> </span><span class="hs-glyph">::</span><span> </span><a href="TensorFlow.BuildOp.html#Result"><span class="hs-identifier hs-type">Result</span></a><span> </span><a href="#local-6989586621679125144"><span class="hs-identifier hs-type">a</span></a><span>
|
|
</span><a name="line-49"></a><span>
|
|
</span><a name="line-50"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125399"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125400"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125399"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125400"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-51"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-52"></a><span>
|
|
</span><a name="line-53"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125396"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125397"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125398"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125396"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125397"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125398"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-54"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-55"></a><span>
|
|
</span><a name="line-56"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125392"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125393"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125394"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125395"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-57"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125392"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125393"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125394"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125395"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-58"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-59"></a><span>
|
|
</span><a name="line-60"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125387"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125388"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125389"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125390"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125391"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-61"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125387"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125388"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125389"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125390"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125391"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-62"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-63"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-64"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-65"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-66"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-67"></a><span>
|
|
</span><a name="line-68"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125381"><span class="hs-identifier hs-type">a1</span></a><span>
|
|
</span><a name="line-69"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125382"><span class="hs-identifier hs-type">a2</span></a><span>
|
|
</span><a name="line-70"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125383"><span class="hs-identifier hs-type">a3</span></a><span>
|
|
</span><a name="line-71"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125384"><span class="hs-identifier hs-type">a4</span></a><span>
|
|
</span><a name="line-72"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125385"><span class="hs-identifier hs-type">a5</span></a><span>
|
|
</span><a name="line-73"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125386"><span class="hs-identifier hs-type">a6</span></a><span>
|
|
</span><a name="line-74"></a><span> </span><span class="hs-special">)</span><span>
|
|
</span><a name="line-75"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125381"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125382"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125383"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125384"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125385"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125386"><span class="hs-identifier hs-type">a6</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-76"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-77"></a><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-78"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-79"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-80"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-81"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-82"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-83"></a><span>
|
|
</span><a name="line-84"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125374"><span class="hs-identifier hs-type">a1</span></a><span>
|
|
</span><a name="line-85"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125375"><span class="hs-identifier hs-type">a2</span></a><span>
|
|
</span><a name="line-86"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125376"><span class="hs-identifier hs-type">a3</span></a><span>
|
|
</span><a name="line-87"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125377"><span class="hs-identifier hs-type">a4</span></a><span>
|
|
</span><a name="line-88"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125378"><span class="hs-identifier hs-type">a5</span></a><span>
|
|
</span><a name="line-89"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125379"><span class="hs-identifier hs-type">a6</span></a><span>
|
|
</span><a name="line-90"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125380"><span class="hs-identifier hs-type">a7</span></a><span>
|
|
</span><a name="line-91"></a><span> </span><span class="hs-special">)</span><span>
|
|
</span><a name="line-92"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125374"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125375"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125376"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125377"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125378"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125379"><span class="hs-identifier hs-type">a6</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125380"><span class="hs-identifier hs-type">a7</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-93"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-94"></a><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-95"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-96"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-97"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-98"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-99"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-100"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-101"></a><span>
|
|
</span><a name="line-102"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125366"><span class="hs-identifier hs-type">a1</span></a><span>
|
|
</span><a name="line-103"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125367"><span class="hs-identifier hs-type">a2</span></a><span>
|
|
</span><a name="line-104"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125368"><span class="hs-identifier hs-type">a3</span></a><span>
|
|
</span><a name="line-105"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125369"><span class="hs-identifier hs-type">a4</span></a><span>
|
|
</span><a name="line-106"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125370"><span class="hs-identifier hs-type">a5</span></a><span>
|
|
</span><a name="line-107"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125371"><span class="hs-identifier hs-type">a6</span></a><span>
|
|
</span><a name="line-108"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125372"><span class="hs-identifier hs-type">a7</span></a><span>
|
|
</span><a name="line-109"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125373"><span class="hs-identifier hs-type">a8</span></a><span>
|
|
</span><a name="line-110"></a><span> </span><span class="hs-special">)</span><span>
|
|
</span><a name="line-111"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125366"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125367"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125368"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125369"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125370"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125371"><span class="hs-identifier hs-type">a6</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125372"><span class="hs-identifier hs-type">a7</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125373"><span class="hs-identifier hs-type">a8</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-112"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-113"></a><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-114"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-115"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-116"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-117"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-118"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-119"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-120"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-121"></a><span>
|
|
</span><a name="line-122"></a><span class="hs-identifier">recordResult</span><span> </span><span class="hs-glyph">::</span><span> </span><a href="TensorFlow.BuildOp.html#Result"><span class="hs-identifier hs-type">Result</span></a><span> </span><a href="TensorFlow.Output.html#Output"><span class="hs-identifier hs-type">Output</span></a><span>
|
|
</span><a name="line-123"></a><a name="recordResult"><a href="TensorFlow.BuildOp.html#recordResult"><span class="hs-identifier">recordResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-124"></a><span> </span><a name="local-6989586621679125403"><a href="#local-6989586621679125403"><span class="hs-identifier">o</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><span class="hs-identifier hs-var">ask</span><span>
|
|
</span><a name="line-125"></a><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><a name="local-6989586621679125404"><a href="#local-6989586621679125404"><span class="hs-identifier">i</span></a></a><span> </span><a name="local-6989586621679125405"><a href="#local-6989586621679125405"><span class="hs-identifier">ns</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><span class="hs-identifier hs-var">get</span><span>
|
|
</span><a name="line-126"></a><span> </span><span class="hs-identifier hs-var">put</span><span> </span><span class="hs-operator hs-var">$!</span><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125404"><span class="hs-identifier hs-var">i</span></a><span class="hs-operator hs-var">+</span><span class="hs-number">1</span><span class="hs-special">)</span><span> </span><a href="#local-6989586621679125405"><span class="hs-identifier hs-var">ns</span></a><span>
|
|
</span><a name="line-127"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$!</span><span> </span><a href="TensorFlow.Output.html#output"><span class="hs-identifier hs-var">output</span></a><span> </span><a href="#local-6989586621679125404"><span class="hs-identifier hs-var">i</span></a><span> </span><a href="#local-6989586621679125403"><span class="hs-identifier hs-var">o</span></a><span>
|
|
</span><a name="line-128"></a><span>
|
|
</span><a name="line-129"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#TensorKind"><span class="hs-identifier hs-type">TensorKind</span></a><span> </span><a href="#local-6989586621679125364"><span class="hs-identifier hs-type">v</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.Tensor.html#Rendered"><span class="hs-identifier hs-type">Rendered</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#Tensor"><span class="hs-identifier hs-type">Tensor</span></a><span> </span><a href="#local-6989586621679125364"><span class="hs-identifier hs-type">v</span></a><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#Tensor"><span class="hs-identifier hs-type">Tensor</span></a><span> </span><a href="#local-6989586621679125364"><span class="hs-identifier hs-type">v</span></a><span> </span><a href="#local-6989586621679125365"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-130"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="TensorFlow.Tensor.html#Tensor"><span class="hs-identifier hs-var">Tensor</span></a><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">pure</span><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#recordResult"><span class="hs-identifier hs-var">recordResult</span></a><span>
|
|
</span><a name="line-131"></a><span>
|
|
</span><a name="line-132"></a><span class="hs-keyword">instance</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="TensorFlow.Output.html#ControlNode"><span class="hs-identifier hs-type">ControlNode</span></a><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-133"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="TensorFlow.Output.html#ControlNode"><span class="hs-identifier hs-var">ControlNode</span></a><span> </span><span class="hs-operator hs-var"><$></span><span> </span><span class="hs-identifier hs-var">ask</span><span>
|
|
</span><a name="line-134"></a><span>
|
|
</span><a name="line-135"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#TensorKind"><span class="hs-identifier hs-type">TensorKind</span></a><span> </span><a href="#local-6989586621679125357"><span class="hs-identifier hs-type">v</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.Tensor.html#Rendered"><span class="hs-identifier hs-type">Rendered</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#Tensor"><span class="hs-identifier hs-type">Tensor</span></a><span> </span><a href="#local-6989586621679125357"><span class="hs-identifier hs-type">v</span></a><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><a href="TensorFlow.Types.html#TensorTypes"><span class="hs-identifier hs-type">TensorTypes</span></a><span> </span><span class="hs-keyword">as</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#TensorList"><span class="hs-identifier hs-type">TensorList</span></a><span> </span><a href="#local-6989586621679125357"><span class="hs-identifier hs-type">v</span></a><span> </span><span class="hs-keyword">as</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-136"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679125359"><span class="hs-identifier hs-var">loop</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Types.html#tensorTypes"><span class="hs-identifier hs-var">tensorTypes</span></a><span> </span><span class="hs-glyph">::</span><span> </span><a href="TensorFlow.Types.html#TensorTypeList"><span class="hs-identifier hs-type">TensorTypeList</span></a><span> </span><span class="hs-keyword">as</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-137"></a><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-138"></a><span> </span><span class="hs-identifier">loop</span><span> </span><span class="hs-glyph">::</span><span> </span><a href="TensorFlow.Types.html#TensorTypeList"><span class="hs-identifier hs-type">TensorTypeList</span></a><span> </span><a href="#local-6989586621679125360"><span class="hs-identifier hs-type">bs</span></a><span> </span><span class="hs-glyph">-></span><span> </span><a href="TensorFlow.BuildOp.html#Result"><span class="hs-identifier hs-type">Result</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#TensorList"><span class="hs-identifier hs-type">TensorList</span></a><span> </span><a href="#local-6989586621679125357"><span class="hs-identifier hs-type">v</span></a><span> </span><a href="#local-6989586621679125360"><span class="hs-identifier hs-type">bs</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-139"></a><span> </span><a name="local-6989586621679125359"><a href="#local-6989586621679125359"><span class="hs-identifier">loop</span></a></a><span> </span><a href="TensorFlow.Types.html#Nil"><span class="hs-identifier hs-var">Nil</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><a href="TensorFlow.Types.html#Nil"><span class="hs-identifier hs-var">Nil</span></a><span>
|
|
</span><a name="line-140"></a><span> </span><span class="hs-identifier">loop</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.Types.html#TensorTypeProxy"><span class="hs-identifier hs-var">TensorTypeProxy</span></a><span> </span><a href="TensorFlow.Types.html#%3A%2F"><span class="hs-operator hs-var">:/</span></a><span> </span><a name="local-6989586621679125361"><a href="#local-6989586621679125361"><span class="hs-identifier">ls</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-141"></a><span> </span><a name="local-6989586621679125362"><a href="#local-6989586621679125362"><span class="hs-identifier">t</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-142"></a><span> </span><a name="local-6989586621679125363"><a href="#local-6989586621679125363"><span class="hs-identifier">ts</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><a href="#local-6989586621679125359"><span class="hs-identifier hs-var">loop</span></a><span> </span><a href="#local-6989586621679125361"><span class="hs-identifier hs-var">ls</span></a><span>
|
|
</span><a name="line-143"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125362"><span class="hs-identifier hs-var">t</span></a><span> </span><a href="TensorFlow.Types.html#%3A%2F"><span class="hs-operator hs-var">:/</span></a><span> </span><a href="#local-6989586621679125363"><span class="hs-identifier hs-var">ts</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-144"></a><span>
|
|
</span><a name="line-145"></a><span class="hs-keyword">instance</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125352"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><span class="hs-special">[</span><a href="#local-6989586621679125352"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">]</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-146"></a><span> </span><a name="local-8214565720323900045"><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier">buildResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-147"></a><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><a name="local-6989586621679125353"><a href="#local-6989586621679125353"><span class="hs-identifier">i</span></a></a><span> </span><a name="local-6989586621679125354"><a href="#local-6989586621679125354"><span class="hs-identifier">ns</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><span class="hs-identifier hs-var">get</span><span>
|
|
</span><a name="line-148"></a><span> </span><span class="hs-keyword">case</span><span> </span><a href="#local-6989586621679125354"><span class="hs-identifier hs-var">ns</span></a><span> </span><span class="hs-keyword">of</span><span>
|
|
</span><a name="line-149"></a><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-></span><span> </span><span class="hs-identifier hs-var">error</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">"Ran out of counts in buildResult. "</span><span> </span><span class="hs-operator hs-var">++</span><span>
|
|
</span><a name="line-150"></a><span> </span><span class="hs-string">"Likely misuse of buildOp."</span><span>
|
|
</span><a name="line-151"></a><span> </span><span class="hs-special">(</span><a name="local-6989586621679125355"><a href="#local-6989586621679125355"><span class="hs-identifier">n</span></a></a><span> </span><span class="hs-glyph">:</span><span> </span><a name="local-6989586621679125356"><a href="#local-6989586621679125356"><span class="hs-identifier">rest</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">-></span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-152"></a><span> </span><span class="hs-identifier hs-var">put</span><span> </span><span class="hs-operator hs-var">$!</span><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><a href="#local-6989586621679125353"><span class="hs-identifier hs-var">i</span></a><span> </span><a href="#local-6989586621679125356"><span class="hs-identifier hs-var">rest</span></a><span>
|
|
</span><a name="line-153"></a><span> </span><span class="hs-identifier hs-var">replicateM</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">fromIntegral</span><span> </span><a href="#local-6989586621679125355"><span class="hs-identifier hs-var">n</span></a><span class="hs-special">)</span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span>
|
|
</span><a name="line-154"></a><span>
|
|
</span><a name="line-155"></a><span class="hs-identifier">buildOp</span><span> </span><span class="hs-glyph">::</span><span> </span><a href="TensorFlow.BuildOp.html#BuildResult"><span class="hs-identifier hs-type">BuildResult</span></a><span> </span><a href="#local-6989586621679125402"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">=></span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Int64</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-></span><span> </span><a href="TensorFlow.Output.html#OpDef"><span class="hs-identifier hs-type">OpDef</span></a><span> </span><span class="hs-glyph">-></span><span> </span><a href="TensorFlow.Build.html#Build"><span class="hs-identifier hs-type">Build</span></a><span> </span><a href="#local-6989586621679125402"><span class="hs-identifier hs-type">a</span></a><span>
|
|
</span><a name="line-156"></a><a name="buildOp"><a href="TensorFlow.BuildOp.html#buildOp"><span class="hs-identifier">buildOp</span></a></a><span> </span><a name="local-6989586621679125406"><a href="#local-6989586621679125406"><span class="hs-identifier">sizes</span></a></a><span> </span><a name="local-6989586621679125407"><a href="#local-6989586621679125407"><span class="hs-identifier">o</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-157"></a><span> </span><a name="local-6989586621679125408"><a href="#local-6989586621679125408"><span class="hs-identifier">n</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><a href="TensorFlow.Build.html#addNewOp"><span class="hs-identifier hs-var">addNewOp</span></a><span> </span><a href="#local-6989586621679125407"><span class="hs-identifier hs-var">o</span></a><span>
|
|
</span><a name="line-158"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-identifier hs-var">flip</span><span> </span><span class="hs-identifier hs-var">evalState</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><span class="hs-number">0</span><span> </span><a href="#local-6989586621679125406"><span class="hs-identifier hs-var">sizes</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">runReaderT</span><span> </span><a href="TensorFlow.BuildOp.html#buildResult"><span class="hs-identifier hs-var">buildResult</span></a><span> </span><a href="#local-6989586621679125408"><span class="hs-identifier hs-var">n</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-159"></a><span>
|
|
</span><a name="line-160"></a><span class="hs-comment">-- | Returns true if all the integers in each tuple are identical.</span><span>
|
|
</span><a name="line-161"></a><span class="hs-comment">-- Throws an error with a descriptive message if not.</span><span>
|
|
</span><a name="line-162"></a><span class="hs-identifier">eqLengthGuard</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-identifier hs-type">String</span><span class="hs-special">,</span><span> </span><span class="hs-identifier hs-type">Int</span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-></span><span> </span><span class="hs-identifier hs-type">Bool</span><span>
|
|
</span><a name="line-163"></a><a name="eqLengthGuard"><a href="TensorFlow.BuildOp.html#eqLengthGuard"><span class="hs-identifier">eqLengthGuard</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">all</span><span> </span><a href="#local-6989586621679125409"><span class="hs-identifier hs-var">eachOk</span></a><span>
|
|
</span><a name="line-164"></a><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-165"></a><span> </span><a name="local-6989586621679125409"><a href="#local-6989586621679125409"><span class="hs-identifier">eachOk</span></a></a><span> </span><span class="hs-special">(</span><span class="hs-identifier">_</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">True</span><span>
|
|
</span><a name="line-166"></a><span> </span><span class="hs-comment">-- The next line has (== 1) . length . nub in disguise</span><span>
|
|
</span><a name="line-167"></a><span> </span><span class="hs-identifier">eachOk</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679125410"><a href="#local-6989586621679125410"><span class="hs-identifier">numberAttrName</span></a></a><span class="hs-special">,</span><span> </span><a name="local-6989586621679125411"><a href="#local-6989586621679125411"><span class="hs-identifier">pairs</span></a></a><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="hs-special">(</span><span class="hs-identifier">_</span><span class="hs-special">,</span><span> </span><a name="local-6989586621679125412"><a href="#local-6989586621679125412"><span class="hs-identifier">x</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">:</span><span> </span><a name="local-6989586621679125413"><a href="#local-6989586621679125413"><span class="hs-identifier">zs</span></a></a><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">all</span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><a name="local-6989586621679125414"><a href="#local-6989586621679125414"><span class="hs-identifier">z</span></a></a><span> </span><span class="hs-glyph">-></span><span> </span><span class="hs-identifier hs-var">snd</span><span> </span><a href="#local-6989586621679125414"><span class="hs-identifier hs-var">z</span></a><span> </span><span class="hs-operator hs-var">==</span><span> </span><a href="#local-6989586621679125412"><span class="hs-identifier hs-var">x</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679125413"><span class="hs-identifier hs-var">zs</span></a><span> </span><span class="hs-operator hs-var">||</span><span>
|
|
</span><a name="line-168"></a><span> </span><span class="hs-identifier hs-var">error</span><span> </span><span class="hs-special">(</span><span class="hs-string">"number_attr "</span><span> </span><span class="hs-operator hs-var">++</span><span> </span><a href="#local-6989586621679125410"><span class="hs-identifier hs-var">numberAttrName</span></a><span> </span><span class="hs-operator hs-var">++</span><span>
|
|
</span><a name="line-169"></a><span> </span><span class="hs-string">" contains tensors with different length "</span><span> </span><span class="hs-operator hs-var">++</span><span> </span><span class="hs-identifier hs-var">show</span><span> </span><a href="#local-6989586621679125411"><span class="hs-identifier hs-var">pairs</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-170"></a><span>
|
|
</span><a name="line-171"></a><span class="hs-comment">-----------</span><span>
|
|
</span><a name="line-172"></a><span>
|
|
</span><a name="line-173"></a><span>
|
|
</span><a name="line-174"></a><span class="hs-comment">-- | Class of types that can be used as op outputs.</span><span>
|
|
</span><a name="line-175"></a><span class="hs-keyword">class</span><span> </span><a name="PureResult"><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier">PureResult</span></a></a><span> </span><a name="local-6989586621679125143"><a href="#local-6989586621679125143"><span class="hs-identifier">a</span></a></a><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-176"></a><span> </span><span class="hs-identifier">pureResult</span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-identifier hs-type">ReaderT</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.Build.html#Build"><span class="hs-identifier hs-type">Build</span></a><span> </span><a href="TensorFlow.Output.html#OpDef"><span class="hs-identifier hs-type">OpDef</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-type">State</span><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-type">ResultState</span></a><span class="hs-special">)</span><span> </span><a href="#local-6989586621679125143"><span class="hs-identifier hs-type">a</span></a><span>
|
|
</span><a name="line-177"></a><span>
|
|
</span><a name="line-178"></a><span class="hs-keyword">instance</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#Tensor"><span class="hs-identifier hs-type">Tensor</span></a><span> </span><a href="TensorFlow.Build.html#Build"><span class="hs-identifier hs-type">Build</span></a><span> </span><a href="#local-6989586621679125200"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-179"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-180"></a><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><a name="local-6989586621679125201"><a href="#local-6989586621679125201"><span class="hs-identifier">i</span></a></a><span> </span><a name="local-6989586621679125202"><a href="#local-6989586621679125202"><span class="hs-identifier">ns</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><span class="hs-identifier hs-var">get</span><span>
|
|
</span><a name="line-181"></a><span> </span><span class="hs-identifier hs-var">put</span><span> </span><span class="hs-operator hs-var">$!</span><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125201"><span class="hs-identifier hs-var">i</span></a><span class="hs-operator hs-var">+</span><span class="hs-number">1</span><span class="hs-special">)</span><span> </span><a href="#local-6989586621679125202"><span class="hs-identifier hs-var">ns</span></a><span>
|
|
</span><a name="line-182"></a><span> </span><a name="local-6989586621679125350"><a href="#local-6989586621679125350"><span class="hs-identifier">makeOp</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><span class="hs-identifier hs-var">ask</span><span>
|
|
</span><a name="line-183"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><a href="TensorFlow.Tensor.html#Tensor"><span class="hs-identifier hs-var">Tensor</span></a><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-184"></a><span> </span><a name="local-6989586621679125351"><a href="#local-6989586621679125351"><span class="hs-identifier">o</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><a href="#local-6989586621679125350"><span class="hs-identifier hs-var">makeOp</span></a><span>
|
|
</span><a name="line-185"></a><span> </span><span class="hs-comment">-- TODO: unify with BuildResult (Tensor v)</span><span>
|
|
</span><a name="line-186"></a><span> </span><a href="TensorFlow.Output.html#output"><span class="hs-identifier hs-var">output</span></a><span> </span><a href="#local-6989586621679125201"><span class="hs-identifier hs-var">i</span></a><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.Build.html#getOrAddOp"><span class="hs-identifier hs-var">getOrAddOp</span></a><span> </span><a href="#local-6989586621679125351"><span class="hs-identifier hs-var">o</span></a><span>
|
|
</span><a name="line-187"></a><span>
|
|
</span><a name="line-188"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125198"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125199"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125198"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125199"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-189"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-190"></a><span>
|
|
</span><a name="line-191"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125195"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125196"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125197"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125195"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125196"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125197"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-192"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-193"></a><span>
|
|
</span><a name="line-194"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125191"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125192"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125193"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125194"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-195"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125191"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125192"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125193"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125194"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-196"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-197"></a><span>
|
|
</span><a name="line-198"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125186"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125187"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125188"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125189"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125190"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-199"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125186"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125187"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125188"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125189"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125190"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-200"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-201"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-202"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-203"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-204"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-205"></a><span>
|
|
</span><a name="line-206"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125180"><span class="hs-identifier hs-type">a1</span></a><span>
|
|
</span><a name="line-207"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125181"><span class="hs-identifier hs-type">a2</span></a><span>
|
|
</span><a name="line-208"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125182"><span class="hs-identifier hs-type">a3</span></a><span>
|
|
</span><a name="line-209"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125183"><span class="hs-identifier hs-type">a4</span></a><span>
|
|
</span><a name="line-210"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125184"><span class="hs-identifier hs-type">a5</span></a><span>
|
|
</span><a name="line-211"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125185"><span class="hs-identifier hs-type">a6</span></a><span>
|
|
</span><a name="line-212"></a><span> </span><span class="hs-special">)</span><span>
|
|
</span><a name="line-213"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125180"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125181"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125182"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125183"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125184"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125185"><span class="hs-identifier hs-type">a6</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-214"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-215"></a><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-216"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-217"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-218"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-219"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-220"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-221"></a><span>
|
|
</span><a name="line-222"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125173"><span class="hs-identifier hs-type">a1</span></a><span>
|
|
</span><a name="line-223"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125174"><span class="hs-identifier hs-type">a2</span></a><span>
|
|
</span><a name="line-224"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125175"><span class="hs-identifier hs-type">a3</span></a><span>
|
|
</span><a name="line-225"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125176"><span class="hs-identifier hs-type">a4</span></a><span>
|
|
</span><a name="line-226"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125177"><span class="hs-identifier hs-type">a5</span></a><span>
|
|
</span><a name="line-227"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125178"><span class="hs-identifier hs-type">a6</span></a><span>
|
|
</span><a name="line-228"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125179"><span class="hs-identifier hs-type">a7</span></a><span>
|
|
</span><a name="line-229"></a><span> </span><span class="hs-special">)</span><span>
|
|
</span><a name="line-230"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125173"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125174"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125175"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125176"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125177"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125178"><span class="hs-identifier hs-type">a6</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125179"><span class="hs-identifier hs-type">a7</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-231"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-232"></a><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-233"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-234"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-235"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-236"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-237"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-238"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-239"></a><span>
|
|
</span><a name="line-240"></a><span class="hs-keyword">instance</span><span> </span><span class="hs-special">(</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125165"><span class="hs-identifier hs-type">a1</span></a><span>
|
|
</span><a name="line-241"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125166"><span class="hs-identifier hs-type">a2</span></a><span>
|
|
</span><a name="line-242"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125167"><span class="hs-identifier hs-type">a3</span></a><span>
|
|
</span><a name="line-243"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125168"><span class="hs-identifier hs-type">a4</span></a><span>
|
|
</span><a name="line-244"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125169"><span class="hs-identifier hs-type">a5</span></a><span>
|
|
</span><a name="line-245"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125170"><span class="hs-identifier hs-type">a6</span></a><span>
|
|
</span><a name="line-246"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125171"><span class="hs-identifier hs-type">a7</span></a><span>
|
|
</span><a name="line-247"></a><span> </span><span class="hs-special">,</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125172"><span class="hs-identifier hs-type">a8</span></a><span>
|
|
</span><a name="line-248"></a><span> </span><span class="hs-special">)</span><span>
|
|
</span><a name="line-249"></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125165"><span class="hs-identifier hs-type">a1</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125166"><span class="hs-identifier hs-type">a2</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125167"><span class="hs-identifier hs-type">a3</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125168"><span class="hs-identifier hs-type">a4</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125169"><span class="hs-identifier hs-type">a5</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125170"><span class="hs-identifier hs-type">a6</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125171"><span class="hs-identifier hs-type">a7</span></a><span class="hs-special">,</span><span> </span><a href="#local-6989586621679125172"><span class="hs-identifier hs-type">a8</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-250"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">,</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-251"></a><span> </span><span class="hs-operator hs-var"><$></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-252"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-253"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-254"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-255"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-256"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-257"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-258"></a><span> </span><span class="hs-operator hs-var"><*></span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-259"></a><span>
|
|
</span><a name="line-260"></a><span class="hs-keyword">instance</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125160"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">[</span><a href="#local-6989586621679125160"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">]</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-261"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-262"></a><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><a name="local-6989586621679125161"><a href="#local-6989586621679125161"><span class="hs-identifier">i</span></a></a><span> </span><a name="local-6989586621679125162"><a href="#local-6989586621679125162"><span class="hs-identifier">ns</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><span class="hs-identifier hs-var">get</span><span>
|
|
</span><a name="line-263"></a><span> </span><span class="hs-keyword">case</span><span> </span><a href="#local-6989586621679125162"><span class="hs-identifier hs-var">ns</span></a><span> </span><span class="hs-keyword">of</span><span>
|
|
</span><a name="line-264"></a><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-></span><span> </span><span class="hs-identifier hs-var">error</span><span> </span><span class="hs-operator hs-var">$</span><span> </span><span class="hs-string">"Ran out of counts in pureResult. "</span><span> </span><span class="hs-operator hs-var">++</span><span>
|
|
</span><a name="line-265"></a><span> </span><span class="hs-string">"Likely misuse of pureOp with output lists."</span><span>
|
|
</span><a name="line-266"></a><span> </span><a name="local-6989586621679125163"><a href="#local-6989586621679125163"><span class="hs-identifier">n</span></a></a><span> </span><span class="hs-glyph">:</span><span> </span><a name="local-6989586621679125164"><a href="#local-6989586621679125164"><span class="hs-identifier">rest</span></a></a><span> </span><span class="hs-glyph">-></span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-267"></a><span> </span><span class="hs-identifier hs-var">put</span><span> </span><span class="hs-operator hs-var">$!</span><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><a href="#local-6989586621679125161"><span class="hs-identifier hs-var">i</span></a><span> </span><a href="#local-6989586621679125164"><span class="hs-identifier hs-var">rest</span></a><span>
|
|
</span><a name="line-268"></a><span> </span><span class="hs-identifier hs-var">replicateM</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-var">fromIntegral</span><span> </span><a href="#local-6989586621679125163"><span class="hs-identifier hs-var">n</span></a><span class="hs-special">)</span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-269"></a><span>
|
|
</span><a name="line-270"></a><span class="hs-keyword">instance</span><span> </span><a href="TensorFlow.Types.html#TensorTypes"><span class="hs-identifier hs-type">TensorTypes</span></a><span> </span><span class="hs-keyword">as</span><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#TensorList"><span class="hs-identifier hs-type">TensorList</span></a><span> </span><a href="TensorFlow.Build.html#Build"><span class="hs-identifier hs-type">Build</span></a><span> </span><span class="hs-keyword">as</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-271"></a><span> </span><a name="local-8214565720323900043"><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier">pureResult</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="#local-6989586621679125155"><span class="hs-identifier hs-var">loop</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Types.html#tensorTypes"><span class="hs-identifier hs-var">tensorTypes</span></a><span> </span><span class="hs-glyph">::</span><span> </span><a href="TensorFlow.Types.html#TensorTypeList"><span class="hs-identifier hs-type">TensorTypeList</span></a><span> </span><span class="hs-keyword">as</span><span class="hs-special">)</span><span>
|
|
</span><a name="line-272"></a><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-273"></a><span> </span><span class="hs-identifier">loop</span><span> </span><span class="hs-glyph">::</span><span> </span><a href="TensorFlow.Types.html#TensorTypeList"><span class="hs-identifier hs-type">TensorTypeList</span></a><span> </span><a href="#local-6989586621679125156"><span class="hs-identifier hs-type">bs</span></a><span> </span><span class="hs-glyph">-></span><span> </span><span class="hs-identifier hs-type">ReaderT</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.Build.html#Build"><span class="hs-identifier hs-type">Build</span></a><span> </span><a href="TensorFlow.Output.html#OpDef"><span class="hs-identifier hs-type">OpDef</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier hs-type">State</span><span> </span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-type">ResultState</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-274"></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#TensorList"><span class="hs-identifier hs-type">TensorList</span></a><span> </span><a href="TensorFlow.Build.html#Build"><span class="hs-identifier hs-type">Build</span></a><span> </span><a href="#local-6989586621679125156"><span class="hs-identifier hs-type">bs</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-275"></a><span> </span><a name="local-6989586621679125155"><a href="#local-6989586621679125155"><span class="hs-identifier">loop</span></a></a><span> </span><a href="TensorFlow.Types.html#Nil"><span class="hs-identifier hs-var">Nil</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><a href="TensorFlow.Types.html#Nil"><span class="hs-identifier hs-var">Nil</span></a><span>
|
|
</span><a name="line-276"></a><span> </span><span class="hs-identifier">loop</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.Types.html#TensorTypeProxy"><span class="hs-identifier hs-var">TensorTypeProxy</span></a><span> </span><a href="TensorFlow.Types.html#%3A%2F"><span class="hs-operator hs-var">:/</span></a><span> </span><a name="local-6989586621679125157"><a href="#local-6989586621679125157"><span class="hs-identifier">ls</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-277"></a><span> </span><a name="local-6989586621679125158"><a href="#local-6989586621679125158"><span class="hs-identifier">t</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span>
|
|
</span><a name="line-278"></a><span> </span><a name="local-6989586621679125159"><a href="#local-6989586621679125159"><span class="hs-identifier">ts</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><a href="#local-6989586621679125155"><span class="hs-identifier hs-var">loop</span></a><span> </span><a href="#local-6989586621679125157"><span class="hs-identifier hs-var">ls</span></a><span>
|
|
</span><a name="line-279"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">(</span><a href="#local-6989586621679125158"><span class="hs-identifier hs-var">t</span></a><span> </span><a href="TensorFlow.Types.html#%3A%2F"><span class="hs-operator hs-var">:/</span></a><span> </span><a href="#local-6989586621679125159"><span class="hs-identifier hs-var">ts</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-280"></a><span>
|
|
</span><a name="line-281"></a><span class="hs-identifier">pureOp</span><span> </span><span class="hs-glyph">::</span><span> </span><a href="TensorFlow.BuildOp.html#PureResult"><span class="hs-identifier hs-type">PureResult</span></a><span> </span><a href="#local-6989586621679125401"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">=></span><span> </span><span class="hs-special">[</span><span class="hs-identifier hs-type">Int64</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-></span><span> </span><a href="TensorFlow.Build.html#Build"><span class="hs-identifier hs-type">Build</span></a><span> </span><a href="TensorFlow.Output.html#OpDef"><span class="hs-identifier hs-type">OpDef</span></a><span> </span><span class="hs-glyph">-></span><span> </span><a href="#local-6989586621679125401"><span class="hs-identifier hs-type">a</span></a><span>
|
|
</span><a name="line-282"></a><a name="pureOp"><a href="TensorFlow.BuildOp.html#pureOp"><span class="hs-identifier">pureOp</span></a></a><span> </span><a name="local-6989586621679125415"><a href="#local-6989586621679125415"><span class="hs-identifier">sizes</span></a></a><span> </span><a name="local-6989586621679125416"><a href="#local-6989586621679125416"><span class="hs-identifier">o</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">flip</span><span> </span><span class="hs-identifier hs-var">evalState</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#ResultState"><span class="hs-identifier hs-var">ResultState</span></a><span> </span><span class="hs-number">0</span><span> </span><a href="#local-6989586621679125415"><span class="hs-identifier hs-var">sizes</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">runReaderT</span><span> </span><a href="TensorFlow.BuildOp.html#pureResult"><span class="hs-identifier hs-var">pureResult</span></a><span> </span><a href="#local-6989586621679125416"><span class="hs-identifier hs-var">o</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-283"></a><span>
|
|
</span><a name="line-284"></a><span class="hs-comment">-----</span><span>
|
|
</span><a name="line-285"></a><span class="hs-comment">-- Class of types that can be used as arguments</span><span>
|
|
</span><a name="line-286"></a><span>
|
|
</span><a name="line-287"></a><span class="hs-keyword">class</span><span> </span><a name="BuildInputs"><a href="TensorFlow.BuildOp.html#BuildInputs"><span class="hs-identifier">BuildInputs</span></a></a><span> </span><a name="local-6989586621679125142"><a href="#local-6989586621679125142"><span class="hs-identifier">a</span></a></a><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-288"></a><span> </span><span class="hs-identifier">buildInputs</span><span> </span><span class="hs-glyph">::</span><span> </span><a href="#local-6989586621679125142"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">-></span><span> </span><a href="TensorFlow.Build.html#Build"><span class="hs-identifier hs-type">Build</span></a><span> </span><span class="hs-special">[</span><a href="TensorFlow.Output.html#Output"><span class="hs-identifier hs-type">Output</span></a><span class="hs-special">]</span><span>
|
|
</span><a name="line-289"></a><span>
|
|
</span><a name="line-290"></a><span class="hs-keyword">instance</span><span> </span><a href="TensorFlow.BuildOp.html#BuildInputs"><span class="hs-identifier hs-type">BuildInputs</span></a><span> </span><a href="#local-6989586621679125153"><span class="hs-identifier hs-type">a</span></a><span> </span><span class="hs-glyph">=></span><span> </span><a href="TensorFlow.BuildOp.html#BuildInputs"><span class="hs-identifier hs-type">BuildInputs</span></a><span> </span><span class="hs-special">[</span><a href="#local-6989586621679125153"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">]</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-291"></a><span> </span><a name="local-8214565720323900041"><a href="TensorFlow.BuildOp.html#buildInputs"><span class="hs-identifier">buildInputs</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">fmap</span><span> </span><span class="hs-identifier hs-var">concat</span><span> </span><span class="hs-operator hs-var">.</span><span> </span><span class="hs-identifier hs-var">mapM</span><span> </span><a href="TensorFlow.BuildOp.html#buildInputs"><span class="hs-identifier hs-var">buildInputs</span></a><span>
|
|
</span><a name="line-292"></a><span>
|
|
</span><a name="line-293"></a><span class="hs-keyword">instance</span><span> </span><a href="TensorFlow.BuildOp.html#BuildInputs"><span class="hs-identifier hs-type">BuildInputs</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#Tensor"><span class="hs-identifier hs-type">Tensor</span></a><span> </span><a href="#local-6989586621679125149"><span class="hs-identifier hs-type">v</span></a><span> </span><a href="#local-6989586621679125150"><span class="hs-identifier hs-type">a</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-294"></a><span> </span><a name="local-8214565720323900041"><a href="TensorFlow.BuildOp.html#buildInputs"><span class="hs-identifier">buildInputs</span></a></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#Tensor"><span class="hs-identifier hs-var">Tensor</span></a><span> </span><a name="local-6989586621679125151"><a href="#local-6989586621679125151"><span class="hs-identifier">t</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
|
|
</span><a name="line-295"></a><span> </span><a name="local-6989586621679125152"><a href="#local-6989586621679125152"><span class="hs-identifier">o</span></a></a><span> </span><span class="hs-glyph"><-</span><span> </span><a href="TensorFlow.Tensor.html#toBuild"><span class="hs-identifier hs-var">toBuild</span></a><span> </span><a href="#local-6989586621679125151"><span class="hs-identifier hs-var">t</span></a><span>
|
|
</span><a name="line-296"></a><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><a href="#local-6989586621679125152"><span class="hs-identifier hs-var">o</span></a><span class="hs-special">]</span><span>
|
|
</span><a name="line-297"></a><span>
|
|
</span><a name="line-298"></a><span class="hs-keyword">instance</span><span> </span><a href="TensorFlow.BuildOp.html#BuildInputs"><span class="hs-identifier hs-type">BuildInputs</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Types.html#ListOf"><span class="hs-identifier hs-type">ListOf</span></a><span> </span><span class="hs-special">(</span><a href="TensorFlow.Tensor.html#Tensor"><span class="hs-identifier hs-type">Tensor</span></a><span> </span><a href="#local-6989586621679125145"><span class="hs-identifier hs-type">v</span></a><span class="hs-special">)</span><span> </span><span class="hs-keyword">as</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
|
|
</span><a name="line-299"></a><span> </span><a name="local-8214565720323900041"><a href="TensorFlow.BuildOp.html#buildInputs"><span class="hs-identifier">buildInputs</span></a></a><span> </span><a href="TensorFlow.Types.html#Nil"><span class="hs-identifier hs-var">Nil</span></a><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">return</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
|
|
</span><a name="line-300"></a><span> </span><span class="hs-identifier">buildInputs</span><span> </span><span class="hs-special">(</span><a name="local-6989586621679125147"><a href="#local-6989586621679125147"><span class="hs-identifier">t</span></a></a><span> </span><a href="TensorFlow.Types.html#%3A%2F"><span class="hs-operator hs-var">:/</span></a><span> </span><a name="local-6989586621679125148"><a href="#local-6989586621679125148"><span class="hs-identifier">ts</span></a></a><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier hs-var">liftM2</span><span> </span><span class="hs-special">(</span><span class="hs-operator hs-var">++</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#buildInputs"><span class="hs-identifier hs-var">buildInputs</span></a><span> </span><a href="#local-6989586621679125147"><span class="hs-identifier hs-var">t</span></a><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><a href="TensorFlow.BuildOp.html#buildInputs"><span class="hs-identifier hs-var">buildInputs</span></a><span> </span><a href="#local-6989586621679125148"><span class="hs-identifier hs-var">ts</span></a><span class="hs-special">)</span><span>
|
|
</span><a name="line-301"></a><span>
|
|
</span><a name="line-302"></a><span class="hs-comment">----</span><span>
|
|
</span><a name="line-303"></a><span>
|
|
</span><a name="line-304"></a><span class="hs-comment">-- | Parameters to build an op (for example, the node name or optional attributes).</span><span>
|
|
</span><a name="line-305"></a><span class="hs-comment">-- TODO: be more type safe.</span><span>
|
|
</span><a name="line-306"></a><span class="hs-keyword">type</span><span> </span><a name="OpParams"><a href="TensorFlow.BuildOp.html#OpParams"><span class="hs-identifier">OpParams</span></a></a><span> </span><span class="hs-glyph">=</span><span> </span><a href="TensorFlow.Output.html#OpDef"><span class="hs-identifier hs-type">OpDef</span></a><span> </span><span class="hs-glyph">-></span><span> </span><a href="TensorFlow.Output.html#OpDef"><span class="hs-identifier hs-type">OpDef</span></a><span>
|
|
</span><a name="line-307"></a></pre></body></html> |