4f855097e3b7e2249d178361b8fbcdbc9bb039eb,mmdnn/conversion/caffe/caffe_emitter.py,CaffeEmitter,emit_Pool,#CaffeEmitter#Any#,290

Before Change


                IR_node.get_attr("strides")[1]))
        else:
            pad_h, pad_w = self._get_symmetric_padding(IR_node)
            self.add_body(1, "n.{:<15} = L.Pooling(n.{}, pool={}, kernel_size={}, pad_h={}, pad_w={}, stride={}, ntop=1)".format(
                IR_node.variable_name,
                self.parent_variable_name(IR_node),
                pooling_type,
                IR_node.get_attr("kernel_shape")[1],
                pad_h,
                pad_w,
                IR_node.get_attr("strides")[1]))

            // check if need crop output shape
            self.check_if_need_crop(IR_node)

After Change


        else:
            pad_h, pad_w = self._get_symmetric_padding(IR_node)
            pool_size = IR_node.get_attr("kernel_shape")[1:3]
            if pool_size[0] != pool_size[1]:
                self.add_body(1, "n.{:<15} = L.Pooling(n.{}, pool={}, kernel_h={}, kernel_w={}, pad_h={}, pad_w={}, stride={}, ntop=1)".format(
                    IR_node.variable_name,
                    self.parent_variable_name(IR_node),
                    pooling_type,
                    pool_size[0],
                    pool_size[1],
                    pad_h,
                    pad_w,
                    IR_node.get_attr("strides")[1]))
            else:
                self.add_body(1, "n.{:<15} = L.Pooling(n.{}, pool={}, kernel_size={}, pad_h={}, pad_w={}, stride={}, ntop=1)".format(
                    IR_node.variable_name,
                    self.parent_variable_name(IR_node),
                    pooling_type,
                    pool_size[0],
                    pad_h,
                    pad_w,
                    IR_node.get_attr("strides")[1]))

            // check if need crop output shape
            self.check_if_need_crop(IR_node)

    def emit_ResizeBilinear(self, IR_node):
        shape = IR_node.get_attr("_output_shapes")[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: Microsoft/MMdnn
Commit Name: 4f855097e3b7e2249d178361b8fbcdbc9bb039eb
Time: 2019-01-10
Author: BlaiseRitchie@users.noreply.github.com
File Name: mmdnn/conversion/caffe/caffe_emitter.py
Class Name: CaffeEmitter
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/onnx/onnx_emitter.py
Class Name: OnnxEmitter
Method Name: emit_Constant


Project Name: Microsoft/MMdnn
Commit Name: 4f855097e3b7e2249d178361b8fbcdbc9bb039eb
Time: 2019-01-10
Author: BlaiseRitchie@users.noreply.github.com
File Name: mmdnn/conversion/caffe/caffe_emitter.py
Class Name: CaffeEmitter
Method Name: emit_Reshape