dee8fbff74c807bdbf72edf3588d4d5f64f36b0b,python/sparkdl/transformers/tf_image.py,TFImageTransformer,_stripGraph,#TFImageTransformer#Any#,204

Before Change


    // 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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: databricks/spark-deep-learning
Commit Name: dee8fbff74c807bdbf72edf3588d4d5f64f36b0b
Time: 2017-06-20
Author: philip.yang@databricks.com
File Name: python/sparkdl/transformers/tf_image.py
Class Name: TFImageTransformer
Method Name: _stripGraph


Project Name: emedvedev/attention-ocr
Commit Name: ab4fec6e3c437d33b59c46a92d5b4c282be1e4dd
Time: 2017-10-05
Author: edward.medvedev@gmail.com
File Name: aocr/util/export.py
Class Name: Exporter
Method Name: save


Project Name: KhronosGroup/NNEF-Tools
Commit Name: 975ba2635d1185e68374e8f0bba6b468d5c90f1a
Time: 2021-03-31
Author: viktor.gyenes@aimotive.com
File Name: nnef_tools/io/tf/graphdef/reader.py
Class Name:
Method Name: _add_output_shapes