1.先获取节点
output_layer = self.model.get_pooled_output() logits = self.tf_instance.matmul(output_layer, output_weights, transpose_b=True) logits = self.tf_instance.nn.bias_add(logits, output_bias) self.probabilities = self.tf_instance.nn.softmax(logits, axis=-1)
2.获取图
graph = self.probabilities.graph