我在Ubuntu 16.04系统上使用TensorFlow 1.10。当我尝试将per_process_gpu_memory_fraction
设置为10,以允许GPU使用系统内存在非常大的RGB图像(12000,12000,3)上训练ResNet时,出现错误:
F:tensorflow/stream_executor/cuda/cuda_dnn.cc:91] Checked failed narrow == wide (-1990967296 vs 2304000000) checked narrowing failed; values not equal post-conversion Aborted (core dumped)
上面引用的代码块如下所示:
// Converts (via narrowing) a type T value to a type U, and checks that the
// value has no value change due to the conversion.
template <typename WideT, typename NarrowT>
NarrowT CheckedNarrowing(const WideT& wide) {
NarrowT narrow = wide;
CHECK_EQ(narrow, wide)
<< "checked narrowing failed; values not equal post-conversion";
return narrow;
}
一个稍小的图像,比如说(10000,10000,3),不会产生这个错误。我想知道是什么导致了这个问题,我该如何解决这个问题?
1条答案
按热度按时间jk9hmnmh1#
我也遇到了同样的错误。解决它的唯一方法似乎是减少数据大小。最近版本的tf也没有解决这个问题。TFer2:www.example.com中的错误https://github.com/keras-team/keras/issues/13984#issuecomment-919629773与此错误不同