Discussions>tensorflow.python.framework.errors_impl.FailedPreconditionError: 2 root error(s) found>

tensorflow.python.framework.errors_impl.FailedPreconditionError: 2 root error(s) found

Why am I getting this? I'm using Tensorflow 1.15 and I try to run, but I get a weird error.

tensorflow.python.framework.errors_impl.FailedPreconditionError: 2 root error(s) found.

What's wrong with this? My model is an autoencoder for semantic segmentation tasks.

2 votesJW326.00
1 Answers
JO295.00
1

The problem is related to the initialization of ops (layers). Make sure you have tf.initialize_all_variables()  or checkpoint loading part.

tf.initialize_all_variables()
saver = tf.train.Saver()
saver.restore(sess, checkpoint_path)
Reply
JO295.00
0

Have you called tf.initialize_all_variables() to initialize all variables before trying to save anything?

AS1.00
1
Hello, I meet the same issue. I have the code below,
self.saver = tf.train.Saver()
self.saver = tf.train.Saver(max_to_keep=self.config.max_epochs)
self
.saver.restore(self.sess, self.config.pretrained_model)

But still have the problem.
Would you please tell me how to resolve it?
Thanks for your help.
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?