Searched refs:crops (Results 1 - 18 of 18) sorted by relevance

/external/tensorflow/tensorflow/contrib/lite/kernels/
H A Dbatch_to_space_nd.cc40 crops = GetInput(context, node, 2);
45 TfLiteTensor* crops; member in struct:tflite::ops::builtin::batch_to_space_nd::BatchToSpaceNDContext
60 const int* crops = GetTensorData<int32>(op_context->crops); local
66 TF_LITE_ENSURE_EQ(context, NumDimensions(op_context->crops),
69 // TODO(ycling): Add crops as part of calculation. Remove check for a crops
71 TF_LITE_ENSURE_EQ(context, crops[0], 0);
72 TF_LITE_ENSURE_EQ(context, crops[1], 0);
73 TF_LITE_ENSURE_EQ(context, crops[
[all...]
H A Dbatch_to_space_nd_test.cc51 // Tests case where block_shape and crops are const tensors.
54 // BatchToSpaceNDOpConstModel m(input_shape, block_shape, crops);
61 std::initializer_list<int> crops) {
64 crops_ = AddConstInput(TensorType_INT32, crops, {2, 2});
74 // Tests case where block_shape and crops are non-const tensors.
80 // m.SetPaddings(crops);
59 BatchToSpaceNDOpConstModel(std::initializer_list<int> input_shape, std::initializer_list<int> block_shape, std::initializer_list<int> crops) argument
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
H A Dbatchtospace_op.cc27 const xla::Literal& crops) {
42 xla::ShapeUtil::Rank(crops.shape()) == 2 &&
43 block_rank == xla::ShapeUtil::GetDimension(crops.shape(), 0) &&
44 2 == xla::ShapeUtil::GetDimension(crops.shape(), 1),
45 errors::InvalidArgument("crops should have shape [", block_rank,
47 xla::ShapeUtil::HumanString(crops.shape())));
118 // `reshaped_permuted` according to `crops` to produce the output of shape:
121 // input_shape[1] * block_shape[0] - crops[0,0] - crops[0,1],
123 // input_shape[M] * block_shape[M-1] - crops[
23 BatchToSpace(XlaOpKernelContext* ctx, const xla::ComputationDataHandle& input, DataType input_dtype, const TensorShape& input_tensor_shape, gtl::ArraySlice<int64> block_shape, const xla::Literal& crops) argument
155 xla::Literal crops; variable
175 xla::Literal crops; variable
[all...]
/external/tensorflow/tensorflow/python/kernel_tests/
H A Dbatchtospace_op_test.py57 crops = array_ops.zeros((2, 2), dtype=crops_dtype)
58 y1 = self.batch_to_space(x, crops, block_size=block_size)
76 crops = np.zeros((2, 2), dtype=np.int32)
79 _ = self.batch_to_space(x_np, crops, block_size)
84 crops = np.zeros((2, 2), dtype=np.int32)
87 out_tf = self.batch_to_space(x_np, crops, block_size)
93 crops = np.zeros((2, 2), dtype=np.int32)
96 out_tf = self.batch_to_space(x_np, crops, block_size)
102 crops = np.zeros((2, 2), dtype=np.int32)
105 out_tf = self.batch_to_space(x_np, crops, block_siz
[all...]
H A Dspacetobatch_op_test.py591 crops):
592 """Checks that `paddings` and `crops` satisfy invariants."""
599 self.assertEqual(crops.shape, (num_block_dims, 2))
607 self.assertEqual(crops[i, 0], 0)
608 self.assertEqual(crops[i, 1], paddings[i, 1] - base_paddings[i, 1])
616 paddings, crops = array_ops.required_space_to_batch_paddings(input_shape,
620 crops_const = tensor_util.constant_value(crops)
H A Datrous_conv2d_test.py103 net = batch_to_space(net, crops=pad, block_size=rate)
133 y2 = array_ops.batch_to_space(y2, crops=pad, block_size=rate)
/external/tensorflow/tensorflow/core/kernels/
H A Dbatchtospace_op.cc63 errors::InvalidArgument("crops should have shape [", block_dims,
67 // crops tensors are concurrently modified, we must copy the values.
69 gtl::InlinedVector<int64, 8> crops; local
71 internal::spacetobatch::SubtleMustCopyFlat(orig_crops, &crops);
78 if (crops[2 * dim] != 0 || crops[2 * dim + 1] != 0 ||
90 if (crops[2 * dim] != 0 || crops[2 * dim + 1] != 0 ||
150 const int64 crop_start = crops[2 * block_dim],
151 crop_end = crops[
[all...]
H A Dcrop_and_resize_op.h35 typename TTypes<float, 4>::Tensor crops);
H A Dcrop_and_resize_op_gpu.cu.cc328 typename TTypes<float, 4>::Tensor crops) {
333 const int num_boxes = crops.dimension(0);
334 const int crop_height = crops.dimension(1);
335 const int crop_width = crops.dimension(2);
336 const int depth = crops.dimension(3);
347 crop_height, crop_width, depth, extrapolation_value, crops.data());
323 operator ()(const OpKernelContext* context, typename TTypes<T, 4>::ConstTensor image, typename TTypes<float, 2>::ConstTensor boxes, typename TTypes<int32, 1>::ConstTensor box_ind, float extrapolation_value, typename TTypes<float, 4>::Tensor crops) argument
H A Dcrop_and_resize_op.cc208 typename TTypes<float, 4>::Tensor crops) {
213 const int num_boxes = crops.dimension(0);
214 const int crop_height = crops.dimension(1);
215 const int crop_width = crops.dimension(2);
216 const int depth = crops.dimension(3);
246 crops(b, y, x, d) = extrapolation_value;
261 crops(b, y, x, d) = extrapolation_value;
281 crops(b, y, x, d) = top + (bottom - top) * y_lerp;
203 operator ()(const OpKernelContext* context, typename TTypes<T, 4>::ConstTensor image, typename TTypes<float, 2>::ConstTensor boxes, typename TTypes<int32, 1>::ConstTensor box_index, float extrapolation_value, typename TTypes<float, 4>::Tensor crops) argument
/external/tensorflow/tensorflow/python/ops/
H A Dimage_grad_test.py266 crops = image_ops.crop_and_resize(
275 self.assertEqual(crops_shape, list(crops.get_shape()))
276 crops = sess.run(crops)
277 self.assertEqual(crops_shape, list(crops.shape))
359 crops = image_ops.crop_and_resize(
368 crops,
H A Dnn_ops.py239 adjusted_{paddings,crops} are int64 tensors of shape [max(spatial_dims), 2]
243 We first define two int64 tensors `paddings` and `crops` of shape
249 paddings, crops = required_space_to_batch_paddings(
258 paddings, crops = required_space_to_batch_paddings(
267 `crops` in order to be usable with these operations. For a given dimension,
278 adjusted_crops[spatial_dims[i] - 1, :] = crops[i, :]
494 paddings, crops = array_ops.required_space_to_batch_paddings(
502 crops = _with_space_to_batch_adjust(crops, 0, spatial_dims)
509 input=result, block_shape=dilation_rate, crops
[all...]
H A Darray_ops.py2195 (paddings, crops), where:
2197 `paddings` and `crops` are int32 Tensors of rank 2 and shape [N, 2]
2204 crops[i, 0] = 0
2205 crops[i, 1] = paddings[i, 1] - base_paddings[i, 1]
2251 [[0, pad_end_extra[i]] for i in range(num_block_dims)], name="crops")
2286 def batch_to_space(input, crops, block_size, name=None): # pylint: disable=redefined-builtin
2289 crops=crops,
/external/tensorflow/tensorflow/core/ops/
H A Darray_ops_test.cc1389 .Input("crops", 1, DT_INT32)
1433 .Input("crops", 2, DT_INT32)
1436 // Verify that input shape and crops shape can be unknown.
1450 // Dimensions are partially known, block_shape and crops known.
1452 Tensor crops = test::AsTensor<int32>({1, 1, 0, 1}, {{2, 2}}); local
1453 op.input_tensors[2] = &crops;
1458 // Dimensions are fully known, block_shape and crops are known.
1460 Tensor crops = test::AsTensor<int32>({1, 1, 0, 0}, {{2, 2}}); local
1461 op.input_tensors[2] = &crops;
1486 INFER_ERROR("crops canno
1495 Tensor crops = test::AsTensor<int32>({3, 2, 0, 0}, {{2, 2}}); local
[all...]
/external/tensorflow/tensorflow/contrib/gan/python/eval/python/
H A Dsliced_wasserstein_impl.py73 res = array_ops.batch_to_space(res, crops=[[0, 0], [0, 0]], block_size=2)
/external/tensorflow/tensorflow/contrib/lite/testing/
H A Dgenerate_examples.py98 # const tensors as crops.
99 r"batch_to_space_nd.*crops=\[\[1,1\],\[1,1\]\]": "70594634",
1471 "crops": [[[0, 0], [0, 0]], [[1, 1], [1, 1]]],
1480 "crops": [[[0, 0], [0, 0], [0, 0]]],
1502 # Get crops either as a const or as a placeholder (tensor).
1504 crops = parameters["crops"]
1506 shape = [len(parameters["crops"]), 2]
1507 crops = tf.placeholder(dtype=tf.int32, name="crops", shap
[all...]
/external/tensorflow/tensorflow/compiler/tests/
H A Drandomized_tests.cc1162 Tensor crops;
1163 CHECK(crops.CopyFrom(AsIntTensor(DT_INT32, crop_vals),
1169 .Input(crops)
1200 Tensor crops;
1201 CHECK(crops.CopyFrom(AsIntTensor(DT_INT32, crop_vals),
1210 .Input(crops)
/external/ImageMagick/www/api/
H A Dtransform.php152 <p>CropImageToTiles() crops a single image, into a possible list of tiles. This may include a single sub-region of the image. This basically applies all the normal geometry flags for Crop.</p>

Completed in 432 milliseconds