1

I am recovering a graph from a checkpoint file. The network was feed using a Dataset iterator. I would like to replace this iterator with a new one, since I want to evaluate the results for some new examples.

I can't find a valid way to override the old iterator with a new one.

This is what I have tried:

saver = tf.train.import_meta_graph("{}.meta".format(checkpoint_file), input_map={})
iterator = tf.get_default_graph().get_operation_by_name("DataPipe/Iterator")
init_op = iterator.make_initializer(dataset)

But I get the following error:

AttributeError: 'Operation' object has no attribute 'make_initializer'

What could I do? The priority is reuse the network I have already trained.

EDIT:

This is a related question, but my network is already trained so I can't change its definition now.

Community
  • 1
  • 1
m33n
  • 1,622
  • 15
  • 38

0 Answers0