[gen_golden] Fix passing wrong parameter for random_sample. (#9387)
author이상규/On-Device Lab(SR)/Principal Engineer/삼성전자 <sg5.lee@samsung.com>
Thu, 5 Dec 2019 00:57:48 +0000 (09:57 +0900)
committer오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>
Thu, 5 Dec 2019 00:57:48 +0000 (09:57 +0900)
random_sample, used in generating fp32 radom numbers, accepts only 1 parameter.
It fixes the python runtime error for this case.

Signed-off-by: Sanggyu Lee <sg5.lee@samsung.com>
tools/nnpackage_tool/gen_golden/gen_golden.py

index b42fc7c..7abeebe 100755 (executable)
@@ -124,7 +124,7 @@ if __name__ == '__main__':
                     np.array(np.random.randint(0, 255, this_shape, this_dtype)))
             elif input_dtypes[idx] == np.float32:
                 input_values.append(
-                    np.array(np.random.random_sample(this_shape, this_dtype)))
+                    np.array(np.random.random_sample(this_shape), this_dtype))
             interpreter.set_tensor(input_details[idx]['index'], input_values[idx])
 
         # get output values by running