/external/tensorflow/tensorflow/python/ops/ragged/ |
D | ragged_util_test.py | 54 axis=0, 59 axis=0, 64 axis=1, 71 axis=0, 76 axis=0, 81 axis=1, 86 dict(data=3, repeats=4, axis=0, expected=[3, 3, 3, 3]), 87 dict(data=[3], repeats=4, axis=0, expected=[3, 3, 3, 3]), 88 dict(data=3, repeats=[4], axis=0, expected=[3, 3, 3, 3]), 89 dict(data=[3], repeats=[4], axis=0, expected=[3, 3, 3, 3]), [all …]
|
D | ragged_util.py | 43 def get_positive_axis(axis, ndims): argument 63 if not isinstance(axis, int): 64 raise TypeError("axis must be an int; got %s" % type(axis).__name__) 66 if 0 <= axis < ndims: 67 return axis 68 elif -ndims <= axis < 0: 69 return axis + ndims 72 "axis=%s out of bounds: expected %s<=axis<%s" % (axis, -ndims, ndims)) 73 elif axis < 0: 75 return axis [all …]
|
D | ragged_reduce_op_test.py | 58 axis=0, 64 axis=-2, 70 axis=1, 76 axis=-1, 82 axis=0, 88 axis=1, 94 axis=0, 100 axis=1, 106 axis=0, 112 axis=1, [all …]
|
D | ragged_tensor_shape.py | 112 for axis, dimension_size in enumerate(partitioned_dim_sizes): 115 'rank of partitioned_dim_sizes[%d] is unknown' % axis) 174 def dimension_size(self, axis): argument 176 if not isinstance(axis, int): 179 if axis < partitioned_ndims: 180 return self._partitioned_dim_sizes[axis] 182 return self._inner_dim_sizes[axis - partitioned_ndims] 184 def is_ragged(self, axis): argument 186 if not isinstance(axis, int): 189 if axis < 0: [all …]
|
D | ragged_stack_op_test.py | 40 axis=0, 46 axis=1, 55 axis=2, 63 axis=-3, 69 axis=-2, 78 axis=-1, 87 axis=0, 95 axis=1, 105 axis=2, 114 axis=-3, [all …]
|
D | ragged_math_ops.py | 224 axis=0) 402 axis, argument 441 return reduce_op(rt_input, axis, name=name) 446 if isinstance(axis, ops.Tensor): 447 axis = tensor_util.constant_value(axis) 448 if axis is None: 450 if isinstance(axis, np.ndarray): 451 axis = axis.tolist() 454 if axis is None: 457 with ops.name_scope(name, 'RaggedReduce', [rt_input, axis]): [all …]
|
D | ragged_row_lengths_op_test.py | 42 axis=2, 51 axis=0, 66 axis=0, 73 axis=0, 78 axis=1, 83 axis=2, 90 axis=0, 94 axis=-3, 98 axis=1, 102 axis=-2, [all …]
|
D | ragged_concat_op_test.py | 52 axis=1, 59 axis=0, 67 axis=1, 77 axis=-2, 85 axis=-1, 97 axis=0, 106 axis=1, 118 axis=0, 134 axis=1, 146 axis=2, [all …]
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | scan_ops_test.py | 33 def numpy_reverse(x, axis): argument 35 if axis < 0: 36 axis = length + axis 39 slice(None, None, -1) if i == axis else slice(None) for i in range(length) 44 def handle_options(func, x, axis, exclusive, reverse): argument 47 if axis < 0: 48 axis = length + axis 51 x = numpy_reverse(x, axis) 54 ix_head = [slice(0, 1) if i == axis else slice(None) for i in range(length)] 56 slice(0, -1) if i == axis else slice(None) for i in range(length) [all …]
|
D | gather_op_test.py | 66 for axis in range(data.ndim): 70 gather_t = array_ops.gather(params, indices, axis=axis) 72 self.assertAllEqual(np.take(params_np, 2, axis=axis), gather_val) 73 expected_shape = data.shape[:axis] + data.shape[axis + 1:] 81 for axis in range(data.ndim): 86 gather_t = array_ops.gather(params, indices, axis=axis) 88 self.assertAllEqual(np.take(params_np, [0, 1, 0, 2], axis=axis), 90 expected_shape = data.shape[:axis] + (4,) + data.shape[axis + 1:] 99 for axis in range(len(shape)): 101 indices = np.random.randint(shape[axis], size=indices_shape) [all …]
|
D | reduce_join_op_test.py | 104 axis, argument 120 axis=axis, 128 def _testMultipleReduceJoin(self, input_array, axis, separator=" "): argument 142 inputs=input_array, axis=axis, keep_dims=False, separator=separator) 144 inputs=input_array, axis=axis, keep_dims=True, separator=separator) 147 for index in axis: 149 inputs=truth, axis=index, keep_dims=True, separator=separator) 150 if not axis: 152 truth_squeezed = array_ops.squeeze(truth, axis=axis) 166 self._testReduceJoin(input_array, truth, truth_shape, axis=0) [all …]
|
/external/tensorflow/tensorflow/compiler/tests/ |
D | scan_ops_test.py | 32 def numpy_reverse(x, axis): argument 34 if axis < 0: 35 axis = length + axis 38 slice(None, None, -1) if i == axis else slice(None) for i in range(length) 43 def handle_options(func, x, axis, exclusive, reverse): argument 46 if axis < 0: 47 axis = length + axis 50 x = numpy_reverse(x, axis) 53 ix_head = [slice(0, 1) if i == axis else slice(None) for i in range(length)] 55 slice(0, -1) if i == axis else slice(None) for i in range(length) [all …]
|
D | gather_test.py | 62 for axis in 0, 1, -1: 66 gather_t = array_ops.gather(params, indices, axis=axis) 69 np.take(params_np, 2, axis=axis), dtype) 77 for axis in 0, 1, -1: 82 gather_t = array_ops.gather(params, indices, axis=axis) 85 np.take(params_np, [0, 1, 0, 2], axis=axis), dtype) 98 for axis in 0, 1, -1: 102 gather_t = array_ops.gather(params, indices, axis=axis) 109 np.take(params_np, [0, 1, 0, 2], axis=axis), dtype) 117 for axis in 0, 1, 2, 3, -1, -2: [all …]
|
/external/tensorflow/tensorflow/python/ops/ |
D | sort_ops.py | 37 def sort(values, axis=-1, direction='ASCENDING', name=None): argument 56 return _sort_or_argsort(values, axis, direction, return_argsort=False) 60 def argsort(values, axis=-1, direction='ASCENDING', stable=False, name=None): argument 89 return _sort_or_argsort(values, axis, direction, return_argsort=True) 92 def _sort_or_argsort(values, axis, direction, return_argsort): argument 112 axis = framework_ops.convert_to_tensor(axis, name='axis') 113 axis_static = tensor_util.constant_value(axis) 114 if axis.shape.ndims != 0 or axis_static is None: 123 def _descending_sort(values, axis, return_argsort=False): argument 135 k = array_ops.shape(values)[axis] [all …]
|
D | linalg_ops.py | 429 axis=None, argument 491 axis=axis, 502 axis=None, argument 569 is_matrix_norm = ((isinstance(axis, tuple) or isinstance(axis, list)) and 570 len(axis) == 2) 572 axis = tuple(axis) 573 if (not isinstance(axis[0], int) or not isinstance(axis[1], int) or 574 axis[0] == axis[1]): 582 if not (isinstance(axis, int) or axis is None): 589 if axis is not None: [all …]
|
/external/fonttools/Tests/ttLib/tables/ |
D | _f_v_a_r_test.py | 54 axis = Axis() 55 axis.axisTag = tag 56 axis.defaultValue = defaultValue 57 axis.minValue, axis.maxValue = minValue, maxValue 58 axis.axisNameID = AddName(font, name).nameID 59 fvarTable.axes.append(axis) 112 axis = Axis() 113 axis.axisTag, axis.axisNameID = ('opsz', 345) 114 axis.minValue, axis.defaultValue, axis.maxValue = (-0.5, 1.3, 1.5) 115 self.assertEqual(FVAR_AXIS_DATA, axis.compile()) [all …]
|
/external/freetype/src/autofit/ |
D | afhints.c | 38 af_axis_hints_new_segment( AF_AxisHints axis, in af_axis_hints_new_segment() argument 46 if ( axis->num_segments < AF_SEGMENTS_EMBEDDED ) in af_axis_hints_new_segment() 48 if ( !axis->segments ) in af_axis_hints_new_segment() 50 axis->segments = axis->embedded.segments; in af_axis_hints_new_segment() 51 axis->max_segments = AF_SEGMENTS_EMBEDDED; in af_axis_hints_new_segment() 54 else if ( axis->num_segments >= axis->max_segments ) in af_axis_hints_new_segment() 56 FT_Int old_max = axis->max_segments; in af_axis_hints_new_segment() 71 if ( axis->segments == axis->embedded.segments ) in af_axis_hints_new_segment() 73 if ( FT_NEW_ARRAY( axis->segments, new_max ) ) in af_axis_hints_new_segment() 75 ft_memcpy( axis->segments, axis->embedded.segments, in af_axis_hints_new_segment() [all …]
|
/external/tensorflow/tensorflow/contrib/distributions/python/ops/ |
D | sample_stats.py | 45 axis=-1, argument 121 if axis < 0: 122 axis = rank + axis 123 shift = rank - 1 - axis 130 x_rotated -= math_ops.reduce_mean(x_rotated, axis=-1, keepdims=True) 149 x_rotated_pad = util.pad(x_rotated, axis=-1, back=True, count=pad_length) 221 axis=None, argument 317 if axis is None: 320 axis = ops.convert_to_tensor(axis, name="axis") 321 check_ops.assert_integer(axis) [all …]
|
/external/fonttools/Lib/fontTools/varLib/ |
D | models.py | 122 for axis,(lower,peak,upper) in support.items(): 131 v = location.get(axis, 0.) 133 assert axis in location 134 v = location[axis] 227 axis = next(iter(loc)) 228 value = loc[axis] 229 if axis not in axisPoints: 230 axisPoints[axis] = {0.} 231 assert value not in axisPoints[axis], ( 232 'Value "%s" in axisPoints["%s"] --> %s' % (value, axis, axisPoints) [all …]
|
/external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/ |
D | sample_stats_test.py | 53 x_ph, axis=1, center=False, normalize=False) 71 x_ph, axis=1, normalize=False, center=True) 80 self, x, axis, max_lags, center, normalize): argument 83 axis_len = x.shape[axis] 90 x -= x.mean(axis=axis, keepdims=True) 93 np.take(x, indices=range(0, axis_len - m), axis=axis) * 94 np.conj(np.take(x, indices=range(m, axis_len), axis=axis)) 95 ).mean(axis=axis, keepdims=True)) 96 rxx = np.concatenate(auto_corr_at_lag, axis=axis) 98 rxx /= np.take(rxx, [0], axis=axis) [all …]
|
/external/harfbuzz_ng/src/ |
D | hb-ot-var-fvar-table.hh | 120 const AxisRecord &axis = get_axes ()[axis_index]; in get_axis_deprecated() local 121 info->tag = axis.axisTag; in get_axis_deprecated() 122 info->name_id = axis.axisNameID; in get_axis_deprecated() 123 info->default_value = axis.defaultValue / 65536.; in get_axis_deprecated() 125 info->min_value = MIN<float> (info->default_value, axis.minValue / 65536.); in get_axis_deprecated() 126 info->max_value = MAX<float> (info->default_value, axis.maxValue / 65536.); in get_axis_deprecated() 132 const AxisRecord &axis = get_axes ()[axis_index]; in get_axis_info() local 134 info->tag = axis.axisTag; in get_axis_info() 135 info->name_id = axis.axisNameID; in get_axis_info() 136 info->flags = (hb_ot_var_axis_flags_t) (unsigned int) axis.flags; in get_axis_info() [all …]
|
/external/tensorflow/tensorflow/lite/kernels/ |
D | expand_dims.cc | 34 int axis, TfLiteTensor* output) { in ExpandTensorDim() argument 36 if (axis < 0) { in ExpandTensorDim() 37 axis = input_dims.size + 1 + axis; in ExpandTensorDim() 39 TF_LITE_ENSURE(context, axis <= input_dims.size); in ExpandTensorDim() 43 if (i < axis) { in ExpandTensorDim() 45 } else if (i == axis) { in ExpandTensorDim() 56 const TfLiteTensor& axis, int* axis_value) { in GetAxisValueFromTensor() argument 57 TF_LITE_ENSURE_EQ(context, NumElements(&axis), 1); in GetAxisValueFromTensor() 58 switch (axis.type) { in GetAxisValueFromTensor() 60 *axis_value = *GetTensorData<int32_t>(&axis); in GetAxisValueFromTensor() [all …]
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
D | scan_ops.cc | 59 int64 axis; in Compile() local 60 OP_REQUIRES_OK(ctx, ctx->ConstantInputAsIntScalar(1, &axis)); in Compile() 61 if (axis < 0) { in Compile() 62 axis += input_shape.dims(); in Compile() 65 ctx, FastBoundsCheck(axis, input_shape.dims()), in Compile() 68 "), but got ", axis)); in Compile() 82 window_dims[axis] = input_shape.dim_size(axis); in Compile() 85 padding[axis].first = input_shape.dim_size(axis) - 1; in Compile() 89 ++padding[axis].first; in Compile() 92 std::swap(padding[axis].first, padding[axis].second); in Compile() [all …]
|
/external/tensorflow/tensorflow/python/keras/ |
D | constraints.py | 64 def __init__(self, max_value=2, axis=0): argument 66 self.axis = axis 70 math_ops.reduce_sum(math_ops.square(w), axis=self.axis, keepdims=True)) 75 return {'max_value': self.max_value, 'axis': self.axis} 105 def __init__(self, axis=0): argument 106 self.axis = axis 112 math_ops.square(w), axis=self.axis, keepdims=True))) 115 return {'axis': self.axis} 148 def __init__(self, min_value=0.0, max_value=1.0, rate=1.0, axis=0): argument 152 self.axis = axis [all …]
|
/external/fonttools/Lib/fontTools/ttLib/tables/ |
D | _a_v_a_r.py | 38 axisTags = [axis.axisTag for axis in ttFont["fvar"].axes] 46 for axis in axisTags: 47 mappings = sorted(self.segments[axis].items()) 56 axisTags = [axis.axisTag for axis in ttFont["fvar"].axes] 64 for axis in axisTags: 65 segments = self.segments[axis] = {} 74 axisTags = [axis.axisTag for axis in ttFont["fvar"].axes] 75 for axis in axisTags: 76 writer.begintag("segment", axis=axis) 78 for key, value in sorted(self.segments[axis].items()): [all …]
|