da6852d07ac747bb608fa0ea6586a642179b5284,mmdnn/conversion/tensorflow/tensorflow_emitter.py,TensorflowEmitter,emit_LRN,#TensorflowEmitter#Any#,557
Before Change
return code
def emit_LRN(self, IR_node):
code = "{:<15} = tf.nn.lrn({}, depth_radius={}, bias={}, alpha={}, beta={}, name="{}")".format(
IR_node.variable_name,
self.parent_variable_name(IR_node),
IR_node.get_attr("size") - 1,
IR_node.get_attr("bias", 1),
IR_node.get_attr("alpha") / (IR_node.get_attr("size") * 2 - 1),
IR_node.get_attr("beta"),
IR_node.name)
return code
def emit_SeparableConv(self, IR_node):
self.used_layers.add(IR_node.type)
After Change
return code
def emit_LRN(self, IR_node):
input_name = IR_node.variable_name
output_name = self.parent_variable_name(IR_node)
IR_name = IR_node.name
size = IR_node.get_attr("size")
depth_radius = int(IR_node.get_attr("size") / 2)
bias = IR_node.get_attr("bias", 1)
alpha = IR_node.get_attr("alpha") / size
beta = IR_node.get_attr("beta")
code = "{:<15} = tf.nn.lrn({}, depth_radius={}, bias={}, alpha={}, beta={}, name="{}")".format(
input_name,
output_name,
depth_radius,
bias,
alpha,
beta,
IR_name)
return code
def emit_SeparableConv(self, IR_node):
self.used_layers.add(IR_node.type)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: Microsoft/MMdnn
Commit Name: da6852d07ac747bb608fa0ea6586a642179b5284
Time: 2020-03-23
Author: 50827462+XiaoXYe@users.noreply.github.com
File Name: mmdnn/conversion/tensorflow/tensorflow_emitter.py
Class Name: TensorflowEmitter
Method Name: emit_LRN
Project Name: deepfakes/faceswap
Commit Name: 5c17417d4d48afb07629d2dfe014cb4b46a736c7
Time: 2019-07-24
Author: 36920800+torzdf@users.noreply.github.com
File Name: lib/gui/wrapper.py
Class Name: FaceswapControl
Method Name: capture_loss
Project Name: Microsoft/MMdnn
Commit Name: da6852d07ac747bb608fa0ea6586a642179b5284
Time: 2020-03-23
Author: 50827462+XiaoXYe@users.noreply.github.com
File Name: mmdnn/conversion/cntk/cntk_emitter.py
Class Name: CntkEmitter
Method Name: emit_LRN