Skip to content

Commit

Permalink
Update Docs for 'ultralytics - 35e1944'
Browse files Browse the repository at this point in the history
  • Loading branch information
UltralyticsAssistant committed Nov 28, 2024
1 parent 35e1944 commit fa3b146
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion reference/models/yolo/classify/predict/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1243,7 +1243,7 @@ <h3 class="doc doc-heading" id="ultralytics.models.yolo.classify.predict.Classif
<a id="__codelineno-0-54" name="__codelineno-0-54"></a> <span class="n">orig_imgs</span> <span class="o">=</span> <span class="n">ops</span><span class="o">.</span><span class="n">convert_torch2numpy_batch</span><span class="p">(</span><span class="n">orig_imgs</span><span class="p">)</span>
<a id="__codelineno-0-55" name="__codelineno-0-55"></a>
<a id="__codelineno-0-56" name="__codelineno-0-56"></a> <span class="k">return</span> <span class="p">[</span>
<a id="__codelineno-0-57" name="__codelineno-0-57"></a> <span class="n">Results</span><span class="p">(</span><span class="n">orig_img</span><span class="p">,</span> <span class="n">path</span><span class="o">=</span><span class="n">img_path</span><span class="p">,</span> <span class="n">names</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">names</span><span class="p">,</span> <span class="n">probs</span><span class="o">=</span><span class="n">pred</span><span class="p">)</span>
<a id="__codelineno-0-57" name="__codelineno-0-57"></a> <span class="n">Results</span><span class="p">(</span><span class="n">orig_img</span><span class="p">,</span> <span class="n">path</span><span class="o">=</span><span class="n">img_path</span><span class="p">,</span> <span class="n">names</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">model</span><span class="o">.</span><span class="n">names</span><span class="p">,</span> <span class="n">probs</span><span class="o">=</span><span class="n">pred</span><span class="o">.</span><span class="n">softmax</span><span class="p">(</span><span class="mi">0</span><span class="p">))</span>
<a id="__codelineno-0-58" name="__codelineno-0-58"></a> <span class="k">for</span> <span class="n">pred</span><span class="p">,</span> <span class="n">orig_img</span><span class="p">,</span> <span class="n">img_path</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="n">preds</span><span class="p">,</span> <span class="n">orig_imgs</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">batch</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
<a id="__codelineno-0-59" name="__codelineno-0-59"></a> <span class="p">]</span>
</code></pre></div></td></tr></table></div>
Expand Down
2 changes: 1 addition & 1 deletion reference/nn/modules/head/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2212,7 +2212,7 @@ <h3 class="doc doc-heading" id="ultralytics.nn.modules.head.Classify.forward">
<a id="__codelineno-0-296" name="__codelineno-0-296"></a> <span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="nb">list</span><span class="p">):</span>
<a id="__codelineno-0-297" name="__codelineno-0-297"></a> <span class="n">x</span> <span class="o">=</span> <span class="n">torch</span><span class="o">.</span><span class="n">cat</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<a id="__codelineno-0-298" name="__codelineno-0-298"></a> <span class="n">x</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">linear</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">drop</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">pool</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">conv</span><span class="p">(</span><span class="n">x</span><span class="p">))</span><span class="o">.</span><span class="n">flatten</span><span class="p">(</span><span class="mi">1</span><span class="p">)))</span>
<a id="__codelineno-0-299" name="__codelineno-0-299"></a> <span class="k">return</span> <span class="n">x</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">training</span> <span class="k">else</span> <span class="n">x</span><span class="o">.</span><span class="n">softmax</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<a id="__codelineno-0-299" name="__codelineno-0-299"></a> <span class="k">return</span> <span class="n">x</span>
</code></pre></div></td></tr></table></div>
</details>
</div>
Expand Down

0 comments on commit fa3b146

Please sign in to comment.