0a2e8beac36bf6c797bf45cdfa27cdd6d2924796,onnx_tf/backend.py,TensorflowBackend,handle_div,#Any#Any#Any#,667

Before Change



  @classmethod
  def handle_div(cls, node, input_dict):
    x = input_dict[node.inputs[0]]
    y = input_dict[node.inputs[1]]
    broadcast = node.attrs["broadcast"]
    if broadcast == 0:
      warnings.warn("Definition of Div with broadcast disabled is incompatible"
        "between onnx and tensorflow.", UserWarning)
    if "axis" in node.attrs.keys():
      warnings.warn("Unsupported alpha attribute by Tensorflow in Div."
        "This attribute will be ignored.", UserWarning)
    return [tf.divide(x, y)]

  @classmethod
  def handle_dropout(cls, node, input_dict):
    x = input_dict[node.inputs[0]]

After Change



  @classmethod
  def handle_div(cls, node, input_dict):
    return [cls._bin_op(node, input_dict, tf.divide)]

  @classmethod
  def handle_dropout(cls, node, input_dict):
    x = input_dict[node.inputs[0]]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 24

Instances


Project Name: onnx/onnx-tensorflow
Commit Name: 0a2e8beac36bf6c797bf45cdfa27cdd6d2924796
Time: 2017-11-04
Author: tjingrant@gmail.com
File Name: onnx_tf/backend.py
Class Name: TensorflowBackend
Method Name: handle_div


Project Name: onnx/onnx-tensorflow
Commit Name: 0a2e8beac36bf6c797bf45cdfa27cdd6d2924796
Time: 2017-11-04
Author: tjingrant@gmail.com
File Name: onnx_tf/backend.py
Class Name: TensorflowBackend
Method Name: handle_sub


Project Name: onnx/onnx-tensorflow
Commit Name: 0a2e8beac36bf6c797bf45cdfa27cdd6d2924796
Time: 2017-11-04
Author: tjingrant@gmail.com
File Name: onnx_tf/backend.py
Class Name: TensorflowBackend
Method Name: handle_mul


Project Name: onnx/onnx-tensorflow
Commit Name: 0a2e8beac36bf6c797bf45cdfa27cdd6d2924796
Time: 2017-11-04
Author: tjingrant@gmail.com
File Name: onnx_tf/backend.py
Class Name: TensorflowBackend
Method Name: handle_add


Project Name: onnx/onnx-tensorflow
Commit Name: 0a2e8beac36bf6c797bf45cdfa27cdd6d2924796
Time: 2017-11-04
Author: tjingrant@gmail.com
File Name: onnx_tf/backend.py
Class Name: TensorflowBackend
Method Name: handle_div