// output. TensorFrames does not like that, so we strip out the parts that
// are not necessary for the computation at hand.
def _stripGraph(self, tf_graph):
input_graph_def = tf_graph.as_graph_def(add_shapes=True)
sess = tf.Session(graph=tf_graph)
return utils.stripAndFreezeGraph(input_graph_def, sess, [self._getFinalOutputOpName()])
def _getOriginalOutputTensorName(self):
After Change
def _stripGraph(self, tf_graph):
gdef = tfx.strip_and_freeze_until([self._getFinalOutputOpName()], tf_graph)
g = tf.Graph()
with g.as_default():
tf.import_graph_def(gdef, name="")
return g
def _getOriginalOutputTensorName(self):
return self.USER_GRAPH_NAMESPACE + "/" + self.getOutputTensor().name