You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/09/24 17:21:14 UTC
[GitHub] Roshrini commented on a change in pull request #12646: Fully
connected operator with no bias
Roshrini commented on a change in pull request #12646: Fully connected operator with no bias
URL: https://github.com/apache/incubator-mxnet/pull/12646#discussion_r219917305
##########
File path: python/mxnet/contrib/onnx/mx2onnx/_op_translations.py
##########
@@ -212,20 +212,46 @@ def convert_fully_connected(node, **kwargs):
"""Map MXNet's FullyConnected operator attributes to onnx's Gemm operator
and return the created node.
"""
- helper, _, _ = import_onnx_modules()
+ helper, _, mapping = import_onnx_modules()
name = node["name"]
inputs = node["inputs"]
+ attrs = node["attrs"]
+ initializer = kwargs["initializer"]
+
+ no_bias = attrs.get("no_bias", "False")
+
input_node_id = kwargs["index_lookup"][inputs[0][0]]
weight_node_id = kwargs["index_lookup"][inputs[1][0]]
- bias_node_id = kwargs["index_lookup"][inputs[2][0]]
+
proc_nodes = kwargs["proc_nodes"]
- input_node = proc_nodes[input_node_id]
- weights_node = proc_nodes[weight_node_id]
- bias_node = proc_nodes[bias_node_id]
+ input_node = proc_nodes[input_node_id]
input_name = input_node.name
+
+ weights_node = proc_nodes[weight_node_id]
weights_name = weights_node.name
- bias_name = bias_node.name
+
+ if no_bias == "False":
Review comment:
Can you check if no_bias is encoded as string '0' or 'False', if both are allowed then need to make changes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services