久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

如何阻止 TensorFlow 使用多線程

How to stop TensorFlow from multi-threading(如何阻止 TensorFlow 使用多線程)
本文介紹了如何阻止 TensorFlow 使用多線程的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在為 NIST FRVT 編寫代碼.NIST 希望程序以最多 2 個線程運行(只有 CPU,沒有 GPU).我在我的代碼中使用 TensorFlow,但它總是產生超過 2 個線程.我嘗試了這個解決方案.它減少了線程數,但沒有達到 2

I am writing code for NIST FRVT. NIST wants the program to run at max 2 threads(Only CPU, No GPU). I am using TensorFlow in my code but it always spawns much more than 2 threads. I tried this solution. It decreased the number of threads, but not up to 2

我收到此警告

[警告] 我們檢測到您的軟件在模板創建期間可能正在線程化或使用其他多處理技術.檢測到的線程數為 9,應該為 2.根據 API 文檔,實現必須運行單線程.在測試環境中,線程沒有優勢,因為 NIST 會在多個刀片和多個進程之間分配工作負載.我們強烈建議您在提交前解決此問題.

[WARNING] We've detected that your software may be threading or using other multiprocessing techniques during template creation. The number of threads detected was 9 and it should be 2. Per the API document, implementations must run single-threaded. In the test environment, there is no advantage to threading, because NIST will distribute workload across multiple blades and multiple processes. We highly recommend that you fix this issue prior to submission.

NIST 正在通過 top -H -b -n1 | 計算線程數grep validate11 |wc -l

有沒有辦法強制 TensorFlow 使用最多 2 個線程?

Is there any way to force TensorFlow to use at max 2 threads?

是否有可以在 2 個線程上運行的 TensorFlow 版本?

Is there any TensorFlow version that will run on 2 threads?

(這是因為TensorFlow,我通過從代碼中刪除TensorFlow部分來檢查)

(It is because of TensorFlow, I checked by removing TensorFlow part from the code)

tensorflow 1.8.0 版

tensorflow version 1.8.0

opencv 3.4.1 版

opencv version 3.4.1

g++ 4.8.5 版

g++ version 4.8.5

g++ -std=c++11

g++ -std=c++11

推薦答案

參考以下來源,似乎無法在 1 或 2 個線程上運行 TensorFlow.

With reference to the following sources, it looks like there is no possibility to run TensorFlow on 1 or 2 threads.

  • https://github.com/tensorflow/tensorflow/issues/33627
  • https://github.com/tensorflow/tensorflow/issues/42510
  • https://github.com/theislab/batchglm/issues/27
  • 使用腳本變量 OMP_NUM_THREADS在程序源文件中
  • 使用 C 更改 Tensorflow 推理的線程數API

我提交了具有超過 6 個線程的 NIST-FRVT 實現,NIST 接受了這一點.6 個線程中只有 1 個在運行,其余線程處于睡眠模式.

I submitted my implementation of NIST-FRVT having more than 6 threads, and NIST accepted that. Only 1 out of 6 threads were running and the rest of the threads were in sleeping mode.

這篇關于如何阻止 TensorFlow 使用多線程的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Assertion failed (size.widthgt;0 amp;amp; size.heightgt;0)(斷言失敗(size.width0 amp;amp; size.height0))
Rotate an image in C++ without using OpenCV functions(在 C++ 中旋轉圖像而不使用 OpenCV 函數)
OpenCV: process every frame(OpenCV:處理每一幀)
Why can#39;t I open avi video in openCV?(為什么我不能在 openCV 中打開 avi 視頻?)
OpenCV unable to set up SVM Parameters(OpenCV 無法設置 SVM 參數)
Convert a single color with cvtColor(使用 cvtColor 轉換單一顏色)
主站蜘蛛池模板: 欧美一区二区三区久久精品 | 成人不卡 | 亚洲精品9999| 欧美精产国品一二三区 | 亚洲成人精品国产 | 伦理午夜电影免费观看 | 免费国产视频 | 小早川怜子xxxxaⅴ在线 | 激情一区二区三区 | 超碰人人爱 | www久久久| 欧美1区2区 | 免费观看一级特黄欧美大片 | 久久精品二区 | 国产成人福利 | 国产91 在线播放 | 久久亚洲欧美日韩精品专区 | 亚洲视频中文 | 日韩欧美国产一区二区 | 日韩成人精品一区二区三区 | 爱草视频| 国产成人久久精品一区二区三区 | 日韩电影一区 | av黄在线观看 | www.狠狠干| 日韩一及片 | 狠狠色综合网站久久久久久久 | 在线欧美 | 久久久精品网站 | 国产伦精品一区二区三区照片91 | 欧美美女爱爱视频 | 91一区二区三区 | 国产精品国产a级 | wwwxxx日本在线观看 | 国产伦精品一区二区三毛 | 欧美国产精品 | 日本韩国欧美在线观看 | 天天操伊人 | h漫在线观看 | 极品粉嫩国产48尤物在线播放 | 久久一二 |