在十位数上使用多个线程进行训练时随机崩溃

2024-10-03 19:33:19 发布

您现在位置:Python中文网/ 问答频道 /正文

问题

以下脚本随机崩溃(即,有时崩溃并生成此回溯,大多数情况下不会)。该脚本利用多个线程并行训练MNIST softmax模型。在

您可以通过运行for ((n=0;n<100;n++)); do python mnist_softmax_parallel_issue.py; done轻松地再现崩溃

回溯

external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorBroadcasting.h:125: Eigen::TensorEvaluator<const Eigen::TensorBroadcastingOp<Broadcast, XprType>, Device>::T
ensorEvaluator(const XprType&, const Device&) [with Broadcast = const Eigen::IndexList<Eigen::type2index<1l>, int>; ArgType = const Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long
 int>, 16, Eigen::MakePointer>; Device = Eigen::ThreadPoolDevice; Eigen::TensorEvaluator<const Eigen::TensorBroadcastingOp<Broadcast, XprType>, Device>::XprType = Eigen::TensorBroadcastingOp<const Eigen::IndexList<Eigen::type2index<1l>, int>, const Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long int>, 16, Eigen::MakePointer> >]: Assertion input_dims[i] > $' failed.

源代码

mnist_softmax_设备_问题.py

^{pr2}$

系统信息

  • 操作系统平台和发行版(例如,Linux Ubuntu 16.04):Ubuntu 16.04.2 LTS
  • TensorFlow安装自(源或二进制):源
  • TensorFlow版本(使用下面的命令):1.3.0-rc2
  • Python版本:2.7.12
  • Bazel版本(如果从源代码处编译):0.4.5

Tags: py版本脚本deviceintbroadcasttensormnist