onnx_chainer.testing.input_generator.positive_increasing¶
- onnx_chainer.testing.input_generator.positive_increasing(*shape, dtype=<class 'numpy.float32'>, bias=1e-07)¶
Returns a monotonically increasing ndarray for test inputs.
Similar to increasing but contains only positive numbers. Expected to be used for math.log, math.sqrt, etc.
Example:
>>> onnx_chainer.testing.input_generator.positive_increasing(3, 4) array([[1.0000000e-07, 5.0000012e-01, 1.0000001e+00, 1.5000001e+00], [2.0000000e+00, 2.5000000e+00, 3.0000000e+00, 3.5000000e+00], [4.0000000e+00, 4.5000000e+00, 5.0000000e+00, 5.5000000e+00]], dtype=float32)
- Parameters
shape (tuple of int) – The shape of the output array.
dtype (numpy.dtype) – The dtype of the output array.
bias (float) – The bias to avoid zero.
- Returns
numpy.ndarray