美文网首页
tf serving 快速模型加载

tf serving 快速模型加载

作者: peteyuan | 来源:发表于2017-09-05 16:26 被阅读59次

    相关的代码在
    load_servables_fast.h/cc中

      const uint32 prev_num_load_threads = manager->num_load_threads();
      manager->SetNumLoadThreads(num_threads);
      ConnectSourceToTarget(source, manager);
      const Status status = wait_until_loaded_fn();
      manager->SetNumLoadThreads(prev_num_load_threads);
      return status;
    

    如注释中所写:临时增加线程数
    // Connects 'source' to 'manager', and speeds up loading of the servables
    // matching 'initial_servables'. The speeding up is accomplished by boosting the
    // number of threads used for loading until the initial servables have been
    // loaded, and then resetting it to the manager's originally configured value.

    相关文章

      网友评论

          本文标题:tf serving 快速模型加载

          本文链接:https://www.haomeiwen.com/subject/gvzujxtx.html