TensorFlow(Mac OS X):无法确定CPU核心数量:

时间:2015-11-09 20:27:08

标签: macos tensorflow

必须有一个简单的Mac OS X设置,以摆脱以下警告... .bash_profile中的内容?

>>> import tensorflow as tf
>>> sess = tf.Session()
can't determine number of CPU cores: assuming 4
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 4

1 个答案:

答案 0 :(得分:23)

要为相关配置选项提供显式值,您可以执行以下操作:

var token = document.getElementById("csrf_token").content,
    requestSaveAddClient = new XMLHttpRequest(),
    newClient = new FormData();

requestSaveAddClient.open( "POST", "newclient", true);
requestSaveAddClient.setRequestHeader("X-CSRF-TOKEN", token);
newClient.append("first_name", first_name);
//etc...
requestSaveAddClient.send(newClient);

此问题出现在TensorFlow for Mac OS X的初始二进制版本中,但应在此提交中修复:https://github.com/tensorflow/tensorflow/commit/430a054d6134f00e5188906bc4080fb7c5035ad5

该修补程序将包含在下一个二进制版本中。在此期间,您可以按照以下说明尝试从源代码构建:http://tensorflow.org/get_started/os_setup.md#installing_from_sources