set</span><span class="p">,</span> <span class="kc">True</span><span class="p">,</span> <span class="n">grad_embedding_type</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">grad_embedding</span><span class="p">)</span>
        
        <span class="c1"># If there is a validation set, set the target gradient vector to be the average validation gradient.</span>
        <span class="c1"># Otherwise, set the target gradient vector to be the average hypothesized g