tf-hrnet
tf-hrnet copied to clipboard
Problems when I load the pretrained model
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
I add import horovod.tensorflow as hvd
because I met a KeyError 'HorovodAllreduce'
https://github.com/horovod/horovod/issues/594
What should I do? Thanks for your reply.