-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
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 add import horovod.tensorflow as hvd
because I met a KeyError 'HorovodAllreduce'
What should I do? Thanks for your reply.
Metadata
Metadata
Assignees
Labels
No labels