mirror of
https://github.com/tensorflow/haskell.git
synced 2024-11-14 23:19:43 +01:00
6b19e54722
* Update README to refer to 2.3.0-gpu. * Remove old package documentation from haddock directory.
2 lines
No EOL
14 KiB
HTML
2 lines
No EOL
14 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>TensorFlow.Minimize</title><link href="linuwial.css" rel="stylesheet" type="text/css" title="Linuwial" /><link rel="stylesheet" type="text/css" href="quick-jump.css" /><link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" /><script src="haddock-bundle.min.js" async="async" type="text/javascript"></script><script type="text/x-mathjax-config">MathJax.Hub.Config({ tex2jax: { processClass: "mathjax", ignoreClass: ".*" } });</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script></head><body><div id="package-header"><span class="caption">tensorflow-ops-0.3.0.0: Friendly layer around TensorFlow bindings.</span><ul class="links" id="page-menu"><li><a href="src/TensorFlow.Minimize.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">TensorFlow.Minimize</p></div><div id="synopsis"><details id="syn"><summary>Synopsis</summary><ul class="details-toggle" data-details-id="syn"><li class="src short"><span class="keyword">type</span> <a href="#t:Minimizer">Minimizer</a> a = <span class="keyword">forall</span> m. <a href="../tensorflow-0.3.0.0/TensorFlow-Build.html#t:MonadBuild" title="TensorFlow.Build">MonadBuild</a> m => [<a href="TensorFlow-Variable.html#t:Variable" title="TensorFlow.Variable">Variable</a> a] -> [<a href="../tensorflow-0.3.0.0/TensorFlow-Tensor.html#t:Tensor" title="TensorFlow.Tensor">Tensor</a> <a href="../tensorflow-0.3.0.0/TensorFlow-Tensor.html#t:Value" title="TensorFlow.Tensor">Value</a> a] -> m <a href="../tensorflow-0.3.0.0/TensorFlow-Output.html#t:ControlNode" title="TensorFlow.Output">ControlNode</a></li><li class="src short"><a href="#v:minimizeWith">minimizeWith</a> :: (<a href="../tensorflow-0.3.0.0/TensorFlow-Build.html#t:MonadBuild" title="TensorFlow.Build">MonadBuild</a> m, <a href="TensorFlow-Gradient.html#t:GradientCompatible" title="TensorFlow.Gradient">GradientCompatible</a> a) => <a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a> a -> <a href="../tensorflow-0.3.0.0/TensorFlow-Tensor.html#t:Tensor" title="TensorFlow.Tensor">Tensor</a> v a -> [<a href="TensorFlow-Variable.html#t:Variable" title="TensorFlow.Variable">Variable</a> a] -> m <a href="../tensorflow-0.3.0.0/TensorFlow-Output.html#t:ControlNode" title="TensorFlow.Output">ControlNode</a></li><li class="src short"><a href="#v:gradientDescent">gradientDescent</a> :: <a href="TensorFlow-Gradient.html#t:GradientCompatible" title="TensorFlow.Gradient">GradientCompatible</a> a => a -> <a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a> a</li><li class="src short"><span class="keyword">type</span> <a href="#t:OneOfAdamDataTypes">OneOfAdamDataTypes</a> t = <a href="../tensorflow-0.3.0.0/TensorFlow-Types.html#t:OneOf" title="TensorFlow.Types">OneOf</a> '[<a href="../base-4.13.0.0/Data-Complex.html#t:Complex" title="Data.Complex">Complex</a> <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">Double</a>, <a href="../base-4.13.0.0/Data-Complex.html#t:Complex" title="Data.Complex">Complex</a> <a href="../base-4.13.0.0/Prelude.html#t:Float" title="Prelude">Float</a>, <a href="../base-4.13.0.0/Data-Int.html#t:Int16" title="Data.Int">Int16</a>, <a href="../base-4.13.0.0/Data-Int.html#t:Int32" title="Data.Int">Int32</a>, <a href="../base-4.13.0.0/Data-Int.html#t:Int64" title="Data.Int">Int64</a>, <a href="../base-4.13.0.0/Data-Int.html#t:Int8" title="Data.Int">Int8</a>, <a href="../base-4.13.0.0/Data-Word.html#t:Word16" title="Data.Word">Word16</a>, <a href="../base-4.13.0.0/Data-Word.html#t:Word32" title="Data.Word">Word32</a>, <a href="../base-4.13.0.0/Data-Word.html#t:Word64" title="Data.Word">Word64</a>, <a href="../base-4.13.0.0/Data-Word.html#t:Word8" title="Data.Word">Word8</a>, <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">Double</a>, <a href="../base-4.13.0.0/Prelude.html#t:Float" title="Prelude">Float</a>] t</li><li class="src short"><span class="keyword">data</span> <a href="#t:AdamConfig">AdamConfig</a> t = <a href="#v:AdamConfig">AdamConfig</a> {<ul class="subs"><li><a href="#v:adamLearningRate">adamLearningRate</a> :: t</li><li><a href="#v:adamBeta1">adamBeta1</a> :: t</li><li><a href="#v:adamBeta2">adamBeta2</a> :: t</li><li><a href="#v:adamEpsilon">adamEpsilon</a> :: t</li></ul>}</li><li class="src short"><a href="#v:adam">adam</a> :: (<a href="TensorFlow-Minimize.html#t:OneOfAdamDataTypes" title="TensorFlow.Minimize">OneOfAdamDataTypes</a> t, <a href="../base-4.13.0.0/Prelude.html#t:Fractional" title="Prelude">Fractional</a> t) => <a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a> t</li><li class="src short"><a href="#v:adam-39-">adam'</a> :: <a href="TensorFlow-Minimize.html#t:OneOfAdamDataTypes" title="TensorFlow.Minimize">OneOfAdamDataTypes</a> t => <a href="TensorFlow-Minimize.html#t:AdamConfig" title="TensorFlow.Minimize">AdamConfig</a> t -> <a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a> t</li></ul></details></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:Minimizer" class="def">Minimizer</a> a = <span class="keyword">forall</span> m. <a href="../tensorflow-0.3.0.0/TensorFlow-Build.html#t:MonadBuild" title="TensorFlow.Build">MonadBuild</a> m => [<a href="TensorFlow-Variable.html#t:Variable" title="TensorFlow.Variable">Variable</a> a] -> [<a href="../tensorflow-0.3.0.0/TensorFlow-Tensor.html#t:Tensor" title="TensorFlow.Tensor">Tensor</a> <a href="../tensorflow-0.3.0.0/TensorFlow-Tensor.html#t:Value" title="TensorFlow.Tensor">Value</a> a] -> m <a href="../tensorflow-0.3.0.0/TensorFlow-Output.html#t:ControlNode" title="TensorFlow.Output">ControlNode</a> <a href="src/TensorFlow.Minimize.html#Minimizer" class="link">Source</a> <a href="#t:Minimizer" class="selflink">#</a></p><div class="doc"><p>Functions that minimize a loss w.r.t. a set of <code><a href="TensorFlow-Variable.html#t:Variable" title="TensorFlow.Variable">Variable</a></code>s.</p><p>Generally only performs one step of an iterative algorithm.</p><p><code><a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a></code>s are defined as a function of the gradients instead of
|
|
the loss so that users can apply transformations to the gradients.</p></div></div><div class="top"><p class="src"><a id="v:minimizeWith" class="def">minimizeWith</a> <a href="src/TensorFlow.Minimize.html#minimizeWith" class="link">Source</a> <a href="#v:minimizeWith" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="../tensorflow-0.3.0.0/TensorFlow-Build.html#t:MonadBuild" title="TensorFlow.Build">MonadBuild</a> m, <a href="TensorFlow-Gradient.html#t:GradientCompatible" title="TensorFlow.Gradient">GradientCompatible</a> a)</td><td class="doc empty"> </td></tr><tr><td class="src">=> <a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="../tensorflow-0.3.0.0/TensorFlow-Tensor.html#t:Tensor" title="TensorFlow.Tensor">Tensor</a> v a</td><td class="doc"><p>Loss.</p></td></tr><tr><td class="src">-> [<a href="TensorFlow-Variable.html#t:Variable" title="TensorFlow.Variable">Variable</a> a]</td><td class="doc"><p>Parameters of the loss function.</p></td></tr><tr><td class="src">-> m <a href="../tensorflow-0.3.0.0/TensorFlow-Output.html#t:ControlNode" title="TensorFlow.Output">ControlNode</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Convenience wrapper around <code><a href="TensorFlow-Gradient.html#v:gradients" title="TensorFlow.Gradient">gradients</a></code> and a <code><a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:gradientDescent" class="def">gradientDescent</a> <a href="src/TensorFlow.Minimize.html#gradientDescent" class="link">Source</a> <a href="#v:gradientDescent" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="TensorFlow-Gradient.html#t:GradientCompatible" title="TensorFlow.Gradient">GradientCompatible</a> a</td><td class="doc empty"> </td></tr><tr><td class="src">=> a</td><td class="doc"><p>Learning rate.</p></td></tr><tr><td class="src">-> <a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a> a</td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Perform one step of the gradient descent algorithm.</p></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a id="t:OneOfAdamDataTypes" class="def">OneOfAdamDataTypes</a> t = <a href="../tensorflow-0.3.0.0/TensorFlow-Types.html#t:OneOf" title="TensorFlow.Types">OneOf</a> '[<a href="../base-4.13.0.0/Data-Complex.html#t:Complex" title="Data.Complex">Complex</a> <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">Double</a>, <a href="../base-4.13.0.0/Data-Complex.html#t:Complex" title="Data.Complex">Complex</a> <a href="../base-4.13.0.0/Prelude.html#t:Float" title="Prelude">Float</a>, <a href="../base-4.13.0.0/Data-Int.html#t:Int16" title="Data.Int">Int16</a>, <a href="../base-4.13.0.0/Data-Int.html#t:Int32" title="Data.Int">Int32</a>, <a href="../base-4.13.0.0/Data-Int.html#t:Int64" title="Data.Int">Int64</a>, <a href="../base-4.13.0.0/Data-Int.html#t:Int8" title="Data.Int">Int8</a>, <a href="../base-4.13.0.0/Data-Word.html#t:Word16" title="Data.Word">Word16</a>, <a href="../base-4.13.0.0/Data-Word.html#t:Word32" title="Data.Word">Word32</a>, <a href="../base-4.13.0.0/Data-Word.html#t:Word64" title="Data.Word">Word64</a>, <a href="../base-4.13.0.0/Data-Word.html#t:Word8" title="Data.Word">Word8</a>, <a href="../base-4.13.0.0/Prelude.html#t:Double" title="Prelude">Double</a>, <a href="../base-4.13.0.0/Prelude.html#t:Float" title="Prelude">Float</a>] t <a href="src/TensorFlow.Minimize.html#OneOfAdamDataTypes" class="link">Source</a> <a href="#t:OneOfAdamDataTypes" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:AdamConfig" class="def">AdamConfig</a> t <a href="src/TensorFlow.Minimize.html#AdamConfig" class="link">Source</a> <a href="#t:AdamConfig" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:AdamConfig" class="def">AdamConfig</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:adamLearningRate" class="def">adamLearningRate</a> :: t</dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:adamBeta1" class="def">adamBeta1</a> :: t</dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:adamBeta2" class="def">adamBeta2</a> :: t</dfn><div class="doc empty"> </div></li><li><dfn class="src"><a id="v:adamEpsilon" class="def">adamEpsilon</a> :: t</dfn><div class="doc empty"> </div></li></ul></div></td></tr></table></div><div class="subs instances"><h4 class="instances details-toggle-control details-toggle" data-details-id="i:AdamConfig">Instances</h4><details id="i:AdamConfig" open="open"><summary class="hide-when-js-enabled">Instances details</summary><table><tr><td class="src clearfix"><span class="inst-left"><span class="instance details-toggle-control details-toggle" data-details-id="i:id:AdamConfig:Default:1"></span> <a href="../base-4.13.0.0/Prelude.html#t:Fractional" title="Prelude">Fractional</a> t => Default (<a href="TensorFlow-Minimize.html#t:AdamConfig" title="TensorFlow.Minimize">AdamConfig</a> t)</span> <a href="src/TensorFlow.Minimize.html#line-86" class="link">Source</a> <a href="#t:AdamConfig" class="selflink">#</a></td><td class="doc empty"> </td></tr><tr><td colspan="2"><details id="i:id:AdamConfig:Default:1"><summary class="hide-when-js-enabled">Instance details</summary><p>Defined in <a href="TensorFlow-Minimize.html">TensorFlow.Minimize</a></p> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:def">def</a> :: <a href="TensorFlow-Minimize.html#t:AdamConfig" title="TensorFlow.Minimize">AdamConfig</a> t</p></div></details></td></tr></table></details></div></div><div class="top"><p class="src"><a id="v:adam" class="def">adam</a> :: (<a href="TensorFlow-Minimize.html#t:OneOfAdamDataTypes" title="TensorFlow.Minimize">OneOfAdamDataTypes</a> t, <a href="../base-4.13.0.0/Prelude.html#t:Fractional" title="Prelude">Fractional</a> t) => <a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a> t <a href="src/TensorFlow.Minimize.html#adam" class="link">Source</a> <a href="#v:adam" class="selflink">#</a></p><div class="doc"><p>Perform one step of the adam algorithm.</p><p>See <a href="https://arxiv.org/abs/1412.6980">https://arxiv.org/abs/1412.6980</a>.</p><p>NOTE: Currently requires all <code><a href="TensorFlow-Variable.html#t:Variable" title="TensorFlow.Variable">Variable</a></code>s to have an <code><a href="TensorFlow-Variable.html#v:initializedValue" title="TensorFlow.Variable">initializedValue</a></code>.</p></div></div><div class="top"><p class="src"><a id="v:adam-39-" class="def">adam'</a> :: <a href="TensorFlow-Minimize.html#t:OneOfAdamDataTypes" title="TensorFlow.Minimize">OneOfAdamDataTypes</a> t => <a href="TensorFlow-Minimize.html#t:AdamConfig" title="TensorFlow.Minimize">AdamConfig</a> t -> <a href="TensorFlow-Minimize.html#t:Minimizer" title="TensorFlow.Minimize">Minimizer</a> t <a href="src/TensorFlow.Minimize.html#adam%27" class="link">Source</a> <a href="#v:adam-39-" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.23.0</p></div></body></html> |