zoukankan      html  css  js  c++  java
  • TensorFlow 建立多个模型导致的运行过慢问题

    在 TensorFlow 里,如果反复编译调度多个模型,代码的运行速度会越来越慢。应该及时调用tf.keras.backend.clear_session()进行资源释放。官方说明如下:

    If you are creating many models in a loop, this global state will consume an increasing amount of memory over time, and you may want to clear it. Calling clear_session() releases the global state: this helps avoid clutter from old models and layers, especially when memory is limited.

  • 相关阅读:
    sql性能调优的注意项
    mybatis获取刚插入数据的ID
    mysql
    JQuery
    JS
    css
    web前端
    python爬虫
    socket编程
    python基础
  • 原文地址:https://www.cnblogs.com/yaos/p/14021299.html
Copyright © 2011-2022 走看看