在抛出“std::system_error”实例后调用 Tensorflow 终止

创意_sh

我正在使用 tensorflow 训练 resNet50,使用具有以下属性的共享服务器:

  • Ubuntu 16.04
  • 3 gtx 1080 gpu
  • 张量流 1.3
  • 蟒蛇 2.7

但总是在两个时代之后,在第三个时代,我遇到这个错误:

terminate called after throwing an instance of 'std::system_error' what():
Resource temporarily unavailable
Aborted (core dumped)

通过在我的代码中添加一些打印,我发现问题出在哪里:

这是将 tfrecord 转换为数据集:

filenames = ["balanced_t.tfrecords"]
dataset = tf.contrib.data.TFRecordDataset(filenames)
    def parser(record):
    keys_to_features = {
        # "label": tf.FixedLenFeature((), tf.string, default_value=""),
        "mhot_label_raw": tf.FixedLenFeature((), tf.string, default_value=""),
        "mel_spec_raw": tf.FixedLenFeature((), tf.string, default_value=""),
    }
    parsed = tf.parse_single_example(record, keys_to_features)

    mel_spec1d = tf.decode_raw(parsed['mel_spec_raw'], tf.float64)
    # label = tf.cast(parsed["label"], tf.string)
    mhot_label = tf.decode_raw(parsed['mhot_label_raw'], tf.float64)
    mel_spec = tf.reshape(mel_spec1d, [96, 64])
    # aa=mel_spec
    return {"mel_data": mel_spec}, mhot_label
    dataset = dataset.map(parser)
    dataset = dataset.batch(batch_size)
    dataset = dataset.repeat(3)
    iterator = dataset.make_one_shot_iterator()

这是我的输入管道

while True:
            try:
               (features, labels) = sess.run(iterator.get_next())
            except tf.errors.OutOfRangeError:
               print("end of training dataset")

由于我的打印输出,错误是针对这一行的:

(features, labels) = sess.run(iterator.get_next())

但我看不出有什么问题,你现在能帮我吗?

创意_sh

我在另一个主题中提出了我的问题并得到了答案:stack_link

这是关于我的 tensorflow 代码,这是某种内存泄漏

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

为什么在抛出'std :: bad_alloc'实例后终止调用?

C ++错误:抛出'std :: bad_alloc'实例后终止调用

Tensorflow MNIST:抛出'std :: bad_alloc'实例后调用终止

iterator.get_next()导致在引发'std :: system_error实例后调用终止

得到错误“抛出'std :: bad_alloc'what():whatstd :: bad_alloc实例后终止调用”

出现错误:抛出'std :: bad :: alloc'what():what std :: bad_alloc实例后终止终止

抛出异常实例后终止调用,核心转储

比较二进制数字输入的字符时,抛出'std :: out_of_range实例后调用终止

在我使用shared_ptr之后,抛出“ std :: bad_weak_ptr的实例后调用终止”是什么

在C ++中抛出'std :: out_of_range'实例后调用终止

抛出'std :: out_of_range'实例后调用终止

抛出'pqxx :: broken_connection'实例后调用终止

在抛出'kj :: ExceptionImpl'实例后,Cap'n Proto终止被调用

在抛出'std :: length_error'what()实例之后调用终止终止what():basic_string :: __ S_create

抛出'std :: regex_error'实例后调用终止

抛出'std :: out_of_range'what():vector :: _ M_range_check实例后终止调用

抛出“std::system_error”线程池实例后调用终止

抛出'std::bad_alloc'的实例后调用C++终止

将字母向前移动 3 个字母的程序,错误:在抛出 'std::out_of_range' 实例后调用终止

在抛出 std::exception 实例后调用终止

抛出“std::invalid_argument”实例后调用终止 what(): leetcode 问题中的 stoi 错误

在抛出“std::regex_error”what() 实例后调用终止:括号未关闭

c++ 在抛出'std::out_of_range' std::vector 的实例后调用终止

在抛出'std::runtime_error' what() 实例后调用终止:filebuf 和 ostream 的 I/O 错误

C++ 中的错误:“在抛出 'std::length_error' what() 实例后调用终止:basic_string::_M_replace_aux”

在抛出 'std::out_of_range' what() 实例后调用终止:basic_string::at: __n 错误

Cmake exe 文件只是在我的系统中在 Sunshine 项目中运行 [在抛出 std::filesystem::__cxx11::filesystem_error 实例后终止调用]

std::stoi() 错误——“在抛出 'std::invalid_argument' 实例后终止调用”

C++ 抛出错误“在抛出‘std::bad_alloc’的实例后终止调用”