0

我正在从这个博客学习 tesnorflow:http: //www.wildml.com/2015/12/implementing-a-cnn-for-text-classification-in-tensorflow/

我正在运行的代码是: https ://github.com/dennybritz/cnn-text-classification-tf/blob/master/train.py

我已经在虚拟环境中从源安装了 tensorflow,在仅 CPU 环境中使用 followinbg bazel build 命令: bazel build --config=mkl ...

这是确切的错误:

“2018-01-16 03:15:27.783040: F tensorflow/core/kernels/mkl_maxpooling_op.cc:157] 检查失败:dnnPoolingCreateForward_F32(&prim_pooling_fwd, primAttr, algorithm, lt_user_input, params.kernel_size, params.kernel_stride, params.in_offset, dnnBorderZerosAsymm) == E_SUCCESS (-127 vs. 0) Aborted "

我已经调试了写入 sess.run 的行的错误,我相信它有一些事情要做 mkl_maxpooling,因为我已经安装了带有 INTEL cpu 的 mkl 优化的 tensorflow

4

1 回答 1

1

以下是我遵循的步骤:

  1. 如问题中所述,使用 mkl 从源代码构建 tensorflow 1.4
  2. 克隆了 git 仓库“ https://github.com/dennybritz/cnn-text-classification-tf.git
  3. 从“cnn-text-classification-tf”目录运行“python train.py”(从 gi​​t clone 创建)

代码运行没有任何错误。因此,似乎 tensorflow 没有从源头正确构建。请确认从源代码构建 tensorflow 时没有错误。

于 2018-02-28T11:00:05.273 回答