---

title: PyTorch Utils


keywords: fastai
sidebar: home_sidebar

summary: "Utilities for PyTorch-dependent modules."
description: "Utilities for PyTorch-dependent modules."
nb_path: "nbs/utils/utils.torch_utils.ipynb"
---
<!--

#################################################
### THIS FILE WAS AUTOGENERATED! DO NOT EDIT! ###
#################################################
# file to edit: nbs/utils/utils.torch_utils.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 ">
<h4 id="seed_everything" class="doc_header"><code>seed_everything</code><a href="https://github.com/RecoHut-Projects/recohut/tree/master/recohut/utils/torch_utils.py#L13" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>seed_everything</code>(<strong><code>seed</code></strong>=<em><code>40</code></em>)</p>
</blockquote>
<p>sets the random seed to establish deterministic behaviors</p>
<p>Args:
    seed (int): the random seed integer</p>

</div>

</div>

</div>
</div>

</div>
    {% endraw %}

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

</div>
    {% endraw %}

</div>
 

