n class="n">torch</span><span class="o">.</span><span class="n">as_tensor</span><span class="p">(</span><span class="n">sigma2</span><span class="p">))</span>
        <span class="bp">self</span><span class="o">.</span><span class="n">dim</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">mu</span><span class="p">)</span>

<div class="viewcode-block" id="IndependentGaussian.forward"><a class="viewcode-back" href="../../../api/layers.html#torchdrug.layers.distr