久久久久久久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 轉換單一顏色)
主站蜘蛛池模板: 久久一区二区视频 | 国内精品久久久久久影视8 最新黄色在线观看 | 国产a区| 国产农村妇女毛片精品久久麻豆 | h视频在线免费观看 | 人人做人人澡人人爽欧美 | 精品久久成人 | 免费观看日韩精品 | www.五月天婷婷.com | 国产小视频在线观看 | 97国产精品| 懂色中文一区二区三区在线视频 | 国产成人精品综合 | 亚洲日本中文 | 性高湖久久久久久久久3小时 | 国产91综合一区在线观看 | 欧美福利| 国产亚洲一区二区精品 | 亚洲精品视频一区二区三区 | 操久久 | 天天综合日日夜夜 | 亚洲精品乱码久久久久久9色 | 国产精品伦理一区 | 国产精品久久久久久久免费大片 | 一级黄色在线 | 久久伊人一区二区 | 日韩一区二区在线观看 | 日韩久久久久 | 国产黄色大片在线观看 | 热99视频| 一二区视频 | 玖玖操| 观看av| 91中文字幕在线观看 | 国产成人99久久亚洲综合精品 | 视频1区2区 | 欧美一区二区在线看 | 亚洲图片视频一区 | 自拍 亚洲 欧美 老师 丝袜 | 看真人视频一级毛片 | 国产免费人成xvideos视频 |