Reputation: 63
While attempting to execute a python Tensorflow implementation of Pix2PixHD that I found online, I encountered the following error:
Traceback (most recent call last):
File "pix2pixHD.py", line 200, in <module>
train(train_dataset, eval_dataset)
File "pix2pixHD.py", line 102, in train
label_imgs, target_imgs = sess.run(next_element)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 950, in run
run_metadata_ptr)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1173, in _run
feed_dict_tensor, options, run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1350, in _do_run
run_metadata)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/client/session.py", line 1370, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.FailedPreconditionError: Could not find required function definition __inference_Dataset_map_image_folder_parser_58
[[{{node OptimizeDataset/MapDataset}}]]
[[OneShotIterator]]
Searching online, I found a post from someone who had a similar issue. While no solution was supplied, another person suggested that the issue was caused by Tensorflow.
The bug appears to be caused by the function passed to tf.data.Dataset.map not being able to be found.
I am not sure if this is caused by a bug in Tensorflow or a bug in the pix2pixHD implementation. I would appreciate any insight on how to debug or resolve this issue.
I am excuting the code on a CPU of a Ubuntu 16.04 machine with Tensorflow 1.14. This issue arises using both python2 and python3.
Upvotes: 0
Views: 649
Reputation: 11
Tensorflow 1.x have this bug, that appear when multiple Sess load. You need to remove tf.reset_default_graph() that reset the graph.
Upvotes: 1