--- title: utils keywords: fastai sidebar: home_sidebar summary: "API details." description: "API details." nb_path: "nbs/06_utils.ipynb" ---
{% raw %}
{% endraw %} {% raw %}
{% endraw %} {% raw %}

disable_gpu[source]

disable_gpu()

disable gpu for tensorflow

{% endraw %} {% raw %}

limit_gpu[source]

limit_gpu(gpu_id:str, memory_limit:int)

limit the selected gpu [gpu_id] by [memory_limit] MB

{% endraw %} {% raw %}
{% endraw %} {% raw %}
limit_gpu(1, 1024*8)
No GPU:1 found in your system!
{% endraw %} {% raw %}

gpu_dynamic_mem_growth[source]

gpu_dynamic_mem_growth()

Borrowed from https://github.com/philipperemy/keract/tree/master/examples

{% endraw %} {% raw %}
{% endraw %} {% raw %}
gpu_dynamic_mem_growth()
No GPU found on the machine!
{% endraw %} {% raw %}
from nbdev.export import notebook2script;notebook2script('05_utils.ipynb')
Converted 05_utils.ipynb.
{% endraw %}