da6852d07ac747bb608fa0ea6586a642179b5284,mmdnn/conversion/mxnet/mxnet_emitter.py,MXNetEmitter,emit_LRN,#MXNetEmitter#Any#,964
Before Change
def emit_LRN(self, IR_node):
code = "{:<15} = mx.sym.LRN(data = {}, alpha = {}, beta = {}, knorm = {}, nsize = {}, name = "{}")".format(
IR_node.variable_name,
self.parent_variable_name(IR_node),
IR_node.layer.attr["alpha"].f,
IR_node.layer.attr["beta"].f,
IR_node.layer.attr["bias"].f,
IR_node.layer.attr["size"].i * 2 - 1,
IR_node.name)
return code
def emit_Constant(self, IR_node):
After Change
def emit_LRN(self, IR_node):
output_name = IR_node.variable_name
input_name = self.parent_variable_name(IR_node)
IR_name = IR_node.name
alpha = IR_node.get_attr("alpha")
beta = IR_node.get_attr("beta")
bias = IR_node.get_attr("bias")
size = IR_node.get_attr("size")
code = "{:<15} = mx.sym.LRN(data = {}, alpha = {}, beta = {}, knorm = {}, nsize = {}, name = "{}")".format(
output_name,
input_name,
alpha,
beta,
bias,
size,
IR_name)
return code
def emit_Constant(self, IR_node):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 14
Instances
Project Name: Microsoft/MMdnn
Commit Name: da6852d07ac747bb608fa0ea6586a642179b5284
Time: 2020-03-23
Author: 50827462+XiaoXYe@users.noreply.github.com
File Name: mmdnn/conversion/mxnet/mxnet_emitter.py
Class Name: MXNetEmitter
Method Name: emit_LRN
Project Name: Microsoft/MMdnn
Commit Name: da6852d07ac747bb608fa0ea6586a642179b5284
Time: 2020-03-23
Author: 50827462+XiaoXYe@users.noreply.github.com
File Name: mmdnn/conversion/caffe/caffe_emitter.py
Class Name: CaffeEmitter
Method Name: emit_LRN
Project Name: Microsoft/MMdnn
Commit Name: da6852d07ac747bb608fa0ea6586a642179b5284
Time: 2020-03-23
Author: 50827462+XiaoXYe@users.noreply.github.com
File Name: mmdnn/conversion/pytorch/pytorch_emitter.py
Class Name: PytorchEmitter
Method Name: emit_LRN