bgawrych commented on a change in pull request #20846:
URL: https://github.com/apache/incubator-mxnet/pull/20846#discussion_r797614635
##########
File path: tests/python/dnnl/test_bf16_operator.py
##########
@@ -55,20 +55,22 @@ def check_operator_accuracy(sym_fp32, sym_bf16, data_shape,
num_input_data=1, bf
etol: float
The error rate threshold, allow a small amount of value not consistent
between bf16 and fp32
"""
- if not isinstance(data_shape, tuple):
- data_shape = tuple(data_shape)
+ if isinstance(data_shape, tuple):
+ data_shape = {"data": data_shape}
data_range = (0.0, 10.0)
data_list_fp32 = list()
data_list_bf16 = list()
- for i in range(num_input_data):
- data_list_fp32.append(mx.nd.random.uniform(low=data_range[0],
high=data_range[1], shape=data_shape))
+ for i, obj in enumerate(data_shape):
Review comment:
replace obj with name/key or use items() to iterate over values in dict
--
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]