-
Notifications
You must be signed in to change notification settings - Fork 4
Description
hi when I run this part
loaded_graph=tf.Graph()
with tf.Session(graph=loaded_graph) as sess:
loader=tf.train.import_meta_graph('./encode_model.meta')
loader.restore(sess,tf.train.latest_checkpoint('./'))
inputs_=loaded_graph.get_tensor_by_name('Placeholder:0')
recon=loaded_graph.get_tensor_by_name('decoder/recon:0')
batch_x = get_batch(len(configfiles,6, batch_size=10)
#show_reconstructed(sess,batch_x,recon)
I get the error. Please suggest a solution.
INFO:tensorflow:Restoring parameters from ./encode_model
ZeroDivisionError Traceback (most recent call last)
in
6 inputs_=loaded_graph.get_tensor_by_name('Placeholder:0')
7 recon=loaded_graph.get_tensor_by_name('decoder/recon:0')
----> 8 batch_x = get_batch(configfiles, 0)
9 #show_reconstructed(sess,batch_x,recon)
in get_batch(configfiles, ibatch, batch_size)
1 def get_batch(configfiles,ibatch, batch_size=100):
2
----> 3 ibatch = ibatch % len(configfiles)
4
5 image_name_list_batch = configfiles[ibatch:ibatch+batch_size]
ZeroDivisionError: integer division or modulo by zero