---

title: OU Noise Layer


keywords: fastai
sidebar: home_sidebar

summary: "Implementation of Ornstein Uhlenbeck Noise."
description: "Implementation of Ornstein Uhlenbeck Noise."
nb_path: "nbs/models/layers/models.layers.ou_noise.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: nbs/models/layers/models.layers.ou_noise.ipynb
# command to build the docs after a change: nbdev_build_docs

-->

<div class="container" id="notebook-container">
        
    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

<div class="output_wrapper">
<div class="output">

<div class="output_area">


<div class="output_markdown rendered_html output_subarea ">
<h2 id="OUNoise" class="doc_header"><code>class</code> <code>OUNoise</code><a href="https://github.com/RecoHut-Projects/recohut/tree/master/recohut/models/layers/ou_noise.py#L9" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>OUNoise</code>(<strong><code>embedded_action_size</code></strong>, <strong><code>ou_mu</code></strong>, <strong><code>ou_theta</code></strong>, <strong><code>ou_sigma</code></strong>, <strong><code>ou_epsilon</code></strong>)</p>
</blockquote>
<p>Ornstein-Uhlenbeck Noise</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">

</div>
    {% endraw %}

    {% raw %}
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">

<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">noise</span> <span class="o">=</span> <span class="n">OUNoise</span><span class="p">(</span><span class="n">embedded_action_size</span> <span class="o">=</span> <span class="mi">32</span><span class="p">,</span>
                <span class="n">ou_mu</span> <span class="o">=</span> <span class="mf">0.0</span><span class="p">,</span>
                <span class="n">ou_theta</span> <span class="o">=</span> <span class="mf">0.15</span><span class="p">,</span>
                <span class="n">ou_sigma</span> <span class="o">=</span> <span class="mf">0.2</span><span class="p">,</span>
                <span class="n">ou_epsilon</span> <span class="o">=</span> <span class="mf">1.0</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">noise</span><span class="o">.</span><span class="n">reset</span><span class="p">()</span>
<span class="n">noise</span><span class="o">.</span><span class="n">get_ou_noise</span><span class="p">()</span>
</pre></div>

    </div>
</div>
</div>

<div class="output_wrapper">
<div class="output">

<div class="output_area">



<div class="output_text output_subarea output_execute_result">
<pre>tensor([ 0.1521,  0.2014,  0.1552,  0.0324, -0.3615,  0.2302, -0.1692, -0.1778,
         0.0083,  0.0672,  0.0395,  0.0195,  0.2221,  0.0395, -0.1529, -0.2925,
         0.0994, -0.0426,  0.0901,  0.2552,  0.2225, -0.0833, -0.2342, -0.1982,
         0.2106,  0.1198,  0.2413,  0.3598,  0.0585,  0.0011,  0.2037, -0.0334])</pre>
</div>

</div>

</div>
</div>

</div>
    {% endraw %}

</div>
 

