0 votes
in Education by (1.7m points)
Using tf.data.Dataset API to build a data pipeline, I encountered an error in training:

pure virtual method called terminate

called without an active exception

Aborted (core dumped)

What's worth noting is that the error did not occur at the beginning but actually the middle of the training process(after 4800 epochs). Here is how I build the pipeline:

import tensorflow as tf

epochs = 30000

eval_step = 400

sess = tf.InteractiveSession()

# code to read and process data

features_placeholder = tf.placeholder(train_features.dtype, train_features.shape)

labels_placeholder = tf.placeholder(train_labels.dtype, train_labels.shape)

train_dataset = tf.data.Dataset.from_tensor_slices((features_placeholder, labels_placeholder, file_list_input))

train_dataset = train_dataset.repeat()

train_dataset = train_dataset.batch(batch_size_placeholder)

train_dataset = train_dataset.prefetch(buffer_size=1)

val_dataset = tf.data.Dataset.from_tensor_slices((features_placeholder, labels_placeholder, file_list_input))

val_dataset = val_dataset.repeat()

val_dataset = val_dataset.batch(batch_size_placeholder)

iterator = tf.data.Iterator.from_structure(train_dataset.output_types, train_dataset.output_shapes)

features, labels = iterator.get_next()

train_iterator = iterator.make_initializer(train_dataset)

val_iterator = iterator.make_initializer(val_dataset)

# code to build model

for i in range(epochs):

    sess.run([train_iterator, ... # other ops],

             feed_dict = {[features_placeholder: train_features,

                           labels_placeholder: train_labels]})

    if (i%eval_step)==0:

        sess.run([val_iterator, ... # other ops],

             feed_dict = {[features_placeholder: val_features,

                           labels_placeholder: val_labels]})

Has anyone had the same issue? How do I solve it?

JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by (1.7m points)
I met probably the same problem with tensorflow 1.12, and solve it after upgrade to 1.13. good luck!
...