nwy2010 opened a new issue, #14442:
URL: https://github.com/apache/tvm/issues/14442
I find some bug!
in tvm/python/tvm/relay/frontend/oneflow.py
1、“FLOW_2_NP_DTYPE“ is undefined
`def get_node_info(node):
"""
Get basic information about nodes: shape, data_type
"""
# list->tuple
shape = tuple(node.input_conf.blob_conf.shape.dim)
# get data type
dtype = node.input_conf.blob_conf.data_type
if dtype in list(FLOW_2_NP_DTYPE.keys()):
data_type = FLOW_2_NP_DTYPE[dtype]
else:
raise IndexError("Please check the data type of your node: %s" %
node.name)
return shape, data_type`
2、"scales" undefined
`class Upsample(OneFlowOpConverter):
"""A helper class for upsample op converters"""
name = ""
@classmethod
def _impl_v1(cls, inputs, attrs, params):
data = inputs[0]
input_shape = infer_shape(data)
dims = len(input_shape)
width_scale = attrs.get("width_scale", 1.0)
height_scale = attrs.get("height_scale", 1.0)
align_corners = attrs.get("align_corners", False)
if "nearest" in cls.name:
method = "nearest_neighbor"
elif "trilinear" in cls.name:
method = "trilinear"
elif "bilinear" in cls.name:
method = "bilinear"
# in 3d case, we use the purely static op
if dims == 5:
if isinstance(scales, _expr.Expr):
scale_h = _op.take(scales, _op.const(3))
scale_w = _op.take(scales, _op.const(4))
scale_d = _op.take(scales, _op.const(1))
else:
assert len(scales) == 5
scale_h = scales[-2]
scale_w = scales[-1]
scale_d = scales[-3]`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]