13ba9a024d50038d94706beeb5267a88a1a2ac5e,mmdnn/conversion/tensorflow/tensorflow_emitter.py,TensorflowEmitter,emit_Const,#TensorflowEmitter#Any#,336

Before Change


        if "dtype" in IR_node.layer.attr:
            dtype_str = "dtype={}".format(self.dtype_map[IR_node.layer.attr["dtype"].type])
            if "int" in dtype_str:
                self.add_body(1, "{:<15} = tf.constant({}, {}, shape=(1,))".format(
                    IR_node.variable_name,
                    IR_node.layer.attr["value"].i,
                    dtype_str))
            else:
                self.add_body(1, "{:<15} = tf.constant({}, {}, shape=(1,))".format(
                    IR_node.variable_name,
                    IR_node.layer.attr["value"].f,

After Change


        if "dtype" in IR_node.layer.attr:
            dtype_str = "dtype={}".format(self.dtype_map[IR_node.layer.attr["dtype"].type])
            if "int" in dtype_str:
                code = "{:<15} = tf.constant({}, {}, shape=(1,))".format(
                    IR_node.variable_name,
                    IR_node.layer.attr["value"].i,
                    dtype_str)
            else:
                code = "{:<15} = tf.constant({}, {}, shape=(1,))".format(
                    IR_node.variable_name,
                    IR_node.layer.attr["value"].f,
                    dtype_str)
        else:
            dtype_str = "dtype=tf.float32"
            code ="{:<15} = tf.constant({}, {}, shape=(1,))".format(
                IR_node.variable_name,
                IR_node.layer.attr["value"].f,
                dtype_str)

        return code

    def emit_Transpose(self, IR_node):
        code ="{:<15} = tf.transpose(a = {}, perm = {})".format(
            IR_node.variable_name,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 29

Non-data size: 5

Instances


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Const


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Flatten


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Constant


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Pool


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: _emit_unary_operation


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_BatchNorm


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Shape


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Sub


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_ConvTranspose


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_SeparableConv


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_LRN


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Split


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Crop


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Mul


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Pad


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_ReduceMean


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Pack


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Transpose


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Scale


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Add


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_PRelu


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_UpSampling2D


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Slice


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Concat


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Conv


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Embedding


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Reshape


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_Squeeze


Project Name: Microsoft/MMdnn
Commit Name: 13ba9a024d50038d94706beeb5267a88a1a2ac5e
Time: 2019-01-07
Author: 42927787+rainLiuplus@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_DepthwiseConv