Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems when I load the pretrained model #11

Open
douyh opened this issue Jul 16, 2020 · 0 comments
Open

Problems when I load the pretrained model #11

douyh opened this issue Jul 16, 2020 · 0 comments

Comments

@douyh
Copy link

douyh commented Jul 16, 2020

I know very little about tensorflow.

I use this code...from the Internet... and try to load the pretrained model W30.

  import tensorflow as tf
  from net.model import HRNet
  import horovod.tensorflow as hvd
  
  
  def load_model(meta, checkpoint_dir):

       with tf.Session() as sess:
          saver = tf.train.import_meta_graph(meta)
          saver.restore(sess, tf.train.latest_checkpoint(checkpoint_dir))
          # graph = tf.get_default_graph()
          # fc = graph.get_tensor_by_name('final_dense')
          # print(fc.shape)
 
 
 
  if __name__ == "__main__":
      load_model('model/model.ckpt-1000000.meta', 'model')

I got an error
image

I add import horovod.tensorflow as hvd because I met a KeyError 'HorovodAllreduce'

horovod/horovod#594

What should I do? Thanks for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant