tensorflow 根据节点名称获取节点

ckpt_file = os.path.join(self.args.bert_dir, 'model.ckpt-6123')

# 获取图的reader
reader = self.tf_instance.train.NewCheckpointReader(ckpt_file)
# 根据节点名称获取节点
output_weights = reader.get_tensor('output_weights')
output_bias = reader.get_tensor('output_bias')

 

转载于:https://www.cnblogs.com/callyblog/p/10388425.html

你可能感兴趣的:(tensorflow 根据节点名称获取节点)