我正在使用具有以下属性的共享服务器训练带有tensorflow的resNet50:
但总是在两个时代之后,在第三个时代,我遇到了这个错误:
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()
这是我输入的pipline
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())
但我没有看到任何问题,你现在能帮助我吗?