We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee7464f commit 8694a6dCopy full SHA for 8694a6d
src/qonnx/util/test.py
@@ -220,6 +220,11 @@ def get_random_input(test_model, seed=42):
220
rng = np.random.RandomState(seed)
221
input_shape = test_model_details[test_model]["input_shape"]
222
(low, high) = test_model_details[test_model]["input_range"]
223
+ # some models spec per-channel ranges, be conservative for those
224
+ if isinstance(low, np.ndarray):
225
+ low = low.max()
226
+ if isinstance(high, np.ndarray):
227
+ high = high.min()
228
size = np.prod(np.asarray(input_shape))
229
input_tensor = rng.uniform(low=low, high=high, size=size)
230
input_tensor = input_tensor.astype(np.float32)
0 commit comments