/dports/misc/py-onnx/onnx-1.10.2/onnx/backend/test/case/node/ |
H A D | averagepool.py | 144 x_shape = np.shape(x) 147 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 149 y = pool(padded, x_shape, kernel_shape, strides, out_shape, [0], 'AVG') 166 x_shape = np.shape(x) 169 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 188 x_shape = np.shape(x) 212 x_shape = np.shape(x) 242 x_shape = np.shape(x) 272 x_shape = np.shape(x) 303 x_shape = np.shape(x) [all …]
|
H A D | maxpool.py | 209 x_shape = np.shape(x) 212 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 214 y = pool(padded, x_shape, kernel_shape, strides, out_shape, [0], 'MAX') 231 x_shape = np.shape(x) 234 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 253 x_shape = np.shape(x) 256 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 277 x_shape = np.shape(x) 307 x_shape = np.shape(x) 337 x_shape = np.shape(x) [all …]
|
H A D | pool_op_common.py | 45 x_shape, # type: Sequence[int] argument 53 spatial_size = len(x_shape) - 2 54 y = np.zeros([x_shape[0], x_shape[1]] + list(out_shape)) 56 for shape in itertools.product(range(x_shape[0]), range(x_shape[1]), *[range(int( 57 …(x_shape[i + 2] + pad_shape[i] - kernel_shape[i]) / strides_shape[i] + 1)) for i in range(spatial_…
|
/dports/misc/glow/glow-f24d960e3cc80db95ac0bc17b1900dbf60ca044a/thirdparty/onnx/onnx/backend/test/case/node/ |
H A D | averagepool.py | 142 x_shape = np.shape(x) 145 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 147 y = pool(padded, x_shape, kernel_shape, strides, out_shape, [0], 'AVG') 164 x_shape = np.shape(x) 167 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 186 x_shape = np.shape(x) 210 x_shape = np.shape(x) 240 x_shape = np.shape(x) 270 x_shape = np.shape(x) 301 x_shape = np.shape(x) [all …]
|
H A D | maxpool.py | 177 x_shape = np.shape(x) 180 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 182 y = pool(padded, x_shape, kernel_shape, strides, out_shape, [0], 'MAX') 199 x_shape = np.shape(x) 202 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 221 x_shape = np.shape(x) 224 out_shape = get_output_shape('VALID', x_shape[2:], kernel_shape, strides) 245 x_shape = np.shape(x) 275 x_shape = np.shape(x) 305 x_shape = np.shape(x) [all …]
|
H A D | pool_op_common.py | 43 x_shape, # type: Sequence[int] argument 51 spatial_size = len(x_shape) - 2 52 y = np.zeros([x_shape[0], x_shape[1]] + list(out_shape)) 54 for shape in itertools.product(range(x_shape[0]), range(x_shape[1]), *[range(int( 55 …(x_shape[i + 2] + pad_shape[i] - kernel_shape[i]) / strides_shape[i] + 1)) for i in range(spatial_…
|
/dports/graphics/tesseract/tesseract-5.0.0/src/lstm/ |
H A D | reversed.cpp | 34 StaticShape x_shape(input_shape); in OutputShape() local 35 x_shape.set_width(input_shape.height()); in OutputShape() 36 x_shape.set_height(input_shape.width()); in OutputShape() 37 x_shape = stack_[0]->OutputShape(x_shape); in OutputShape() 38 x_shape.SetShape(x_shape.batch(), x_shape.width(), x_shape.height(), x_shape.depth()); in OutputShape() 39 return x_shape; in OutputShape()
|
/dports/misc/tvm/incubator-tvm-0.6.1/python/tvm/contrib/ |
H A D | cudnn.py | 182 x_shape, argument 216 assert len(x_shape) == 4 227 x_shape[0].value, 228 x_shape[1].value, 229 x_shape[2].value, 230 x_shape[3].value, 246 x_shape, argument 289 x_shape[0].value, 290 x_shape[1].value, 291 x_shape[2].value, [all …]
|
/dports/misc/py-tvm/incubator-tvm-0.6.1/python/tvm/contrib/ |
H A D | cudnn.py | 182 x_shape, argument 216 assert len(x_shape) == 4 227 x_shape[0].value, 228 x_shape[1].value, 229 x_shape[2].value, 230 x_shape[3].value, 246 x_shape, argument 289 x_shape[0].value, 290 x_shape[1].value, 291 x_shape[2].value, [all …]
|
/dports/misc/mxnet/incubator-mxnet-1.9.0/3rdparty/tvm/python/tvm/contrib/ |
H A D | cudnn.py | 148 def _prepare_global_func_params(dims, pad, stride, dilation, x_shape=None, w_shape=None): argument 150 if x_shape: 151 assert isinstance(x_shape, list) 152 assert len(x_shape) == full_dims 173 xshape = np.array(x_shape, dtype=np.int32) if x_shape else None 174 wshape = np.array(w_shape, dtype=np.int32) if x_shape else None 212 dims = len(x_shape) 216 dims - 2, pad, stride, dilation, x_shape, w_shape 242 x_shape, argument 281 dims = len(x_shape) [all …]
|
/dports/science/py-chainer/chainer-7.8.0/chainer/functions/activation/ |
H A D | maxout.py | 70 x_shape = x.shape 71 if x_shape[axis] % pool_size != 0: 74 x_shape[axis], pool_size) 78 shape = (x_shape[:axis] + 79 (x_shape[axis] // pool_size, pool_size) + 80 x_shape[axis + 1:])
|
/dports/misc/py-onnx-tf/onnx-tf-1.6.0/onnx_tf/handlers/backend/ |
H A D | upsample.py | 23 x_shape = x.get_shape().as_list() 24 if len(x_shape) != 4: 35 x_shape = x.get_shape().as_list() 38 new_height = np.floor(x_shape[2] * scales[2]) 39 new_weight = np.floor(x_shape[3] * scales[3]) 58 x_shape = x.get_shape().as_list() 68 h_w_shape = x_shape[2:]
|
H A D | resize.py | 48 x_shape = x.get_shape().as_list() 49 if len(x_shape) != 4: 124 x_shape = tf_shape(x) 136 h_w_shape = tf.where(x_in_NCHW_format, x_shape[2:], x_shape[1:3]) 165 x_shape = tf_shape(x) 197 h_w_shape = tf.where(x_in_NCHW_format, x_shape[2:], x_shape[1:3]) 202 sizes.set_shape(x_shape.shape) 227 box_indices = tf.cast(tf.range(0, x_shape[0]), dtype=tf.int32)
|
/dports/science/py-chainer/chainer-7.8.0/chainerx_cc/chainerx/cuda/ |
H A D | cuda_conv_test.cc | 48 Shape x_shape{batch_size, in_channels}; in TEST() local 49 std::copy(in_dims.begin(), in_dims.end(), std::back_inserter(x_shape)); in TEST() 54 …Array x = testing::BuildArray(x_shape).WithLinearData<float>(-x_shape.GetTotalSize() / 2.0f, 1.0f)… in TEST() 94 Shape x_shape{batch_size, in_channels}; in TEST() local 95 std::copy(in_dims.begin(), in_dims.end(), std::back_inserter(x_shape)); in TEST() 100 …Array x = testing::BuildArray(x_shape).WithLinearData<float>(-x_shape.GetTotalSize() / 2.0f, 1.0f)… in TEST() 139 Shape x_shape{batch_size, in_channels}; in TEST() local 140 std::copy(in_dims.begin(), in_dims.end(), std::back_inserter(x_shape)); in TEST() 144 …Array x = testing::BuildArray(x_shape).WithLinearData<float>(-x_shape.GetTotalSize() / 2.0f, 1.0f)… in TEST()
|
/dports/misc/tvm/incubator-tvm-0.6.1/tests/python/relay/ |
H A D | test_op_grad_level2.py | 27 def verify_max_pool2d_grad(x_shape, pool_size, strides, padding, ceil_mode): argument 28 x = relay.var("x", relay.TensorType(x_shape, "float32")) 36 data = np.random.rand(*x_shape).astype("float32") 55 def verify_avg_pool2d_grad(x_shape, pool_size, strides, padding, ceil_mode, count_include_pad): argument 56 x = relay.var("x", relay.TensorType(x_shape, "float32")) 64 data = np.random.rand(*x_shape).astype("float32") 84 def verify_global_avg_pool2d_grad(x_shape): argument 85 x = relay.var("x", relay.TensorType(x_shape, "float32")) 92 data = np.random.rand(*x_shape).astype("float32") 95 ref_grad = topi.testing.pool_grad_nchw(data, out_grad, pool_size=(x_shape[2], x_shape[3]),
|
H A D | test_pass_combine_parallel_conv2d.py | 61 x = relay.var("x", shape=x_shape) 62 in_c = x_shape[1] 106 def check(x_shape, channels1, channels2): argument 107 x = relay.var("x", shape=x_shape) 108 in_c = x_shape[1] 146 def check(x_shape, channels1, channels2): argument 147 x = relay.var("x", shape=x_shape) 148 in_c = x_shape[1] 184 def check(x_shape, repeat): argument 185 x = relay.var("x", shape=x_shape) [all …]
|
/dports/misc/py-tvm/incubator-tvm-0.6.1/tests/python/relay/ |
H A D | test_op_grad_level2.py | 27 def verify_max_pool2d_grad(x_shape, pool_size, strides, padding, ceil_mode): argument 28 x = relay.var("x", relay.TensorType(x_shape, "float32")) 36 data = np.random.rand(*x_shape).astype("float32") 55 def verify_avg_pool2d_grad(x_shape, pool_size, strides, padding, ceil_mode, count_include_pad): argument 56 x = relay.var("x", relay.TensorType(x_shape, "float32")) 64 data = np.random.rand(*x_shape).astype("float32") 84 def verify_global_avg_pool2d_grad(x_shape): argument 85 x = relay.var("x", relay.TensorType(x_shape, "float32")) 92 data = np.random.rand(*x_shape).astype("float32") 95 ref_grad = topi.testing.pool_grad_nchw(data, out_grad, pool_size=(x_shape[2], x_shape[3]),
|
H A D | test_pass_combine_parallel_conv2d.py | 61 x = relay.var("x", shape=x_shape) 62 in_c = x_shape[1] 106 def check(x_shape, channels1, channels2): argument 107 x = relay.var("x", shape=x_shape) 108 in_c = x_shape[1] 146 def check(x_shape, channels1, channels2): argument 147 x = relay.var("x", shape=x_shape) 148 in_c = x_shape[1] 184 def check(x_shape, repeat): argument 185 x = relay.var("x", shape=x_shape) [all …]
|
/dports/science/py-chainer/chainer-7.8.0/chainer/functions/math/ |
H A D | bias.py | 40 x_shape = x.shape 43 assert x_shape[axis:axis + len(y_shape)] == y_shape 45 [1] * (len(x_shape) - axis - len(y_shape))) 47 y2 = broadcast.broadcast_to(y1, x_shape)
|
H A D | scale.py | 40 x_shape = x.shape 43 assert x_shape[axis:axis + len(y_shape)] == y_shape 45 [1] * (len(x_shape) - axis - len(y_shape))) 47 y2 = broadcast.broadcast_to(y1, x_shape)
|
/dports/misc/mnn/MNN-1.2.0/test/plugin/ |
H A D | PluginTest.cpp | 42 auto x_shape = x->getInfo(); in _PluginMatMul() local 44 MNN_CHECK(x_shape->dim.size() == 2, "2-D shape is required."); in _PluginMatMul() 47 int M = x_shape->dim[0]; in _PluginMatMul() 48 int K = x_shape->dim[1]; in _PluginMatMul() 51 M = x_shape->dim[1]; in _PluginMatMul() 52 K = x_shape->dim[0]; in _PluginMatMul()
|
/dports/misc/mxnet/incubator-mxnet-1.9.0/3rdparty/tvm/tests/python/relay/ |
H A D | test_op_grad_level2.py | 29 def verify_max_pool2d_grad(x_shape, pool_size, strides, padding, ceil_mode): argument 30 x = relay.var("x", relay.TensorType(x_shape, "float32")) 39 data = np.random.rand(*x_shape).astype("float32") 69 def verify_avg_pool2d_grad(x_shape, pool_size, strides, padding, ceil_mode, count_include_pad): argument 70 x = relay.var("x", relay.TensorType(x_shape, "float32")) 84 data = np.random.rand(*x_shape).astype("float32") 124 def verify_global_avg_pool2d_grad(x_shape): argument 125 x = relay.var("x", relay.TensorType(x_shape, "float32")) 132 data = np.random.rand(*x_shape).astype("float32") 138 pool_size=(x_shape[2], x_shape[3]),
|
H A D | test_pass_combine_parallel_conv2d.py | 73 x = relay.var("x", shape=x_shape) 74 in_c = x_shape[1] 122 def check(x_shape, channels1, channels2): argument 123 x = relay.var("x", shape=x_shape) 124 in_c = x_shape[1] 166 def check(x_shape, channels1, channels2): argument 167 x = relay.var("x", shape=x_shape) 168 in_c = x_shape[1] 207 def check(x_shape, repeat): argument 208 x = relay.var("x", shape=x_shape) [all …]
|
/dports/science/py-scipy/scipy-1.7.1/scipy/interpolate/ |
H A D | polyint.py | 77 x, x_shape = self._prepare_x(x) 79 return self._finish_y(y, x_shape) 90 x_shape = x.shape 91 return x.ravel(), x_shape 93 def _finish_y(self, y, x_shape): argument 96 if self._y_axis != 0 and x_shape != (): 97 nx = len(x_shape) 176 x, x_shape = self._prepare_x(x) 181 nx = len(x_shape) 215 x, x_shape = self._prepare_x(x) [all …]
|
/dports/science/py-chainer/chainer-7.8.0/chainer/functions/normalization/ |
H A D | decorrelated_batch_normalization.py | 48 def _calc_axis_and_m(x_shape, batch_size): argument 50 spatial_ndim = len(x_shape) - 2 53 m *= x_shape[i] 85 x_shape = x.shape 86 b, c = x_shape[:2] 89 spatial_axis, m = _calc_axis_and_m(x_shape, b) 111 y = y_hat.reshape((c, b) + x_shape[2:]).transpose( 222 x_shape = x.shape 223 b, c = x_shape[:2] 226 spatial_axis, m = _calc_axis_and_m(x_shape, b) [all …]
|