Home
last modified time | relevance | path

Searched refs:axes (Results 1 – 25 of 231) sorted by relevance

12345678910

/external/tensorflow/tensorflow/contrib/labeled_tensor/python/ops/
Dops.py45 labeled_tensor.axes.remove(axis.name).values()))
49 return core.transpose(indexed, labeled_tensor.axes.keys(), name=scope)
84 if axis_name not in labeled_tensor.axes:
87 (axis_name, labeled_tensor.axes.keys()))
88 axis = labeled_tensor.axes[axis_name]
178 axes_0 = labeled_tensors[0].axes
189 current_shared_axes = labeled_tensor.axes.remove(axis_name)
198 concat_axis_list.append(labeled_tensor.axes[axis_name])
247 axes_0 = labeled_tensors[0].axes
249 if t.axes != axes_0:
[all …]
Dio_ops.py43 def __init__(self, axes, dtype, default_value=None): argument
44 self._axes = [core.as_axis(a) for a in axes]
49 def axes(self): member in FixedLenFeature
67 shape = [ax.size for ax in labeled_feature.axes]
111 axes = list(serialized.axes.values()) + features[name].axes
112 parsed[name] = core.LabeledTensor(parsed_feature, axes)
147 parsed[name] = core.LabeledTensor(parsed_feature, features[name].axes)
155 def placeholder(dtype, axes, name=None): argument
174 axes = core.Axes([(axis, None) if isinstance(axis, string_types) else axis
175 for axis in axes])
[all …]
Dcore.py206 def __init__(self, axes): argument
217 for axis_data in axes:
280 def __init__(self, tensor, axes): argument
294 if isinstance(axes, Axes):
295 unvalidated_axes = axes
299 for position, axis_like in enumerate(axes):
334 axes = ["('%s', %r)" % (v.name, v.value) for v in self.axes.values()]
335 axes_repr = (',\n' + ' ' * len(' axes=[')).join(axes)
355 def axes(self): member in LabeledTensor
390 if len(key) != len(self.axes):
[all …]
Dcore_test.py53 axes = [self.i_7, self.i_7p, self.i_rgb, self.i_range, self.i_unknown]
54 for i, axis_0 in enumerate(axes):
55 for j, axis_1 in enumerate(axes):
66 axes = [self.i_7, self.i_7p, self.i_rgb, self.i_range, self.i_unknown]
67 for axis in axes:
183 alt_lt = core.LabeledTensor(self.lt.tensor, self.lt.axes)
187 alt_lt = core.LabeledTensor(self.lt.tensor, self.lt.axes.values())
193 list(self.lt.axes.values())[:-1])
198 list(self.lt.axes.values())[1:-1])
203 list(self.lt.axes.values())[2:-1])
[all …]
Dops_test.py247 self.original_lt.axes.keys(),
248 self.original_lt.axes.values())
257 [self.original_lt.axes['x'], 'new_dim'])
265 [self.original_lt.axes['x'], 'new_dim'])
272 self.assertEqual(reshape_lt.axes, core.Axes([('y', None), ('z', 1)]))
283 [self.original_lt.axes['x'], ('new_dim', range(new_dim_size))])
309 for name, axis in self.original_lt.axes.items()]
337 self.assertEqual(len(batch_2_op.axes['batch']), 2)
345 self.assertEqual(len(batch_2_op.axes['batch']), 2)
359 self.assertEqual(batch_2_op.axes['batch'].size, None)
[all …]
Dsugar.py90 axes = [labeled_tensor.axes[n] for n in self._existing_axis_names]
91 if self._existing_axes is not None and self._existing_axes != axes:
94 (axes, self._existing_axes))
96 self._existing_axes = axes
/external/fonttools/Tests/varLib/
Dmodels_test.py9 axes = {"wght": (100, 400, 900)}
10 assert normalizeLocation({"wght": 400}, axes) == {'wght': 0.0}
11 assert normalizeLocation({"wght": 100}, axes) == {'wght': -1.0}
12 assert normalizeLocation({"wght": 900}, axes) == {'wght': 1.0}
13 assert normalizeLocation({"wght": 650}, axes) == {'wght': 0.5}
14 assert normalizeLocation({"wght": 1000}, axes) == {'wght': 1.0}
15 assert normalizeLocation({"wght": 0}, axes) == {'wght': -1.0}
17 axes = {"wght": (0, 0, 1000)}
18 assert normalizeLocation({"wght": 0}, axes) == {'wght': 0.0}
19 assert normalizeLocation({"wght": -1}, axes) == {'wght': 0.0}
[all …]
/external/tensorflow/tensorflow/python/ops/
Dbatch_norm_benchmark.py68 def build_graph(device, input_shape, axes, num_layers, mode, scale, train): argument
87 if axis in axes:
93 if axis not in axes:
99 mean, variance = nn_impl.moments(tensor, axes, keep_dims=keep_dims)
126 def _run_graph(self, device, input_shape, axes, num_layers, mode, scale, argument
145 outputs = build_graph(device, input_shape, axes, num_layers, mode, scale,
155 (device, len(input_shape), len(axes), num_layers, mode, scale, train,
171 axes=str(axes)).replace(" ", ""),
180 axes = [0, 1, 2]
181 t1 = self._run_graph("cpu", shape, axes, 10, "op", True, False, 5)
[all …]
Dnn_batchnorm_test.py354 def _npSuffStats(self, x, axes, shift, keep_dims): argument
355 axis = tuple(axes)
364 if d in set(axes):
370 def _opSuffStats(self, x, axes, shift, keep_dims): argument
371 return nn_impl.sufficient_statistics(x, axes, shift, keep_dims)
373 def _testSuffStats(self, x_shape, axes, shift, keep_dims, has_shape): argument
375 np_c, np_m, np_v, np_s = self._npSuffStats(x_val, axes, shift, keep_dims)
381 op_c, op_m, op_v, op_s = self._opSuffStats(x, axes, shift, keep_dims)
389 op_c, op_m, op_v, op_s = self._opSuffStats(x, axes, shift, keep_dims)
457 def _unweighted_moments(self, x, axes, keep_dims=False, extra_out_grads=None): argument
[all …]
Dnn_impl.py811 def sufficient_statistics(x, axes, shift=None, keep_dims=None, name=None, argument
837 axes = list(set(axes))
845 if all(x_shape.dims[d].value is not None for d in axes):
847 for d in axes:
852 math_ops.cast(array_ops.shape(x), x.dtype), axes)
861 m_ss = math_ops.reduce_sum(m_ss, axes, keepdims=keep_dims, name="mean_ss")
862 v_ss = math_ops.reduce_sum(v_ss, axes, keepdims=keep_dims, name="var_ss")
867 def sufficient_statistics_v2(x, axes, shift=None, keepdims=False, name=None): argument
892 x=x, axes=axes, shift=shift, keep_dims=keepdims, name=name)
930 axes, argument
[all …]
Dmath_ops.py3174 def reduced_shape(input_shape, axes): argument
3187 axes = axes.numpy()
3188 input_shape[axes] = 1
3192 axes = cast(axes, dtypes.int32) # [1, 2]
3195 axes = (axes + input_rank) % input_rank
3196 axes_shape = array_ops.shape(axes) # [2]
3200 axes
3553 def tensordot(a, b, axes, name=None): argument
3601 def _tensordot_reshape(a, axes, flipped=False): argument
3625 if a.get_shape().is_fully_defined() and isinstance(axes, (list, tuple)):
[all …]
/external/tensorflow/tensorflow/python/keras/layers/
Dmerge.py466 def __init__(self, axes, normalize=False, **kwargs): argument
468 if not isinstance(axes, int):
469 if not isinstance(axes, (list, tuple)):
472 if len(axes) != 2:
475 if not isinstance(axes[0], int) or not isinstance(axes[1], int):
478 self.axes = axes
493 if isinstance(self.axes, int):
494 if self.axes < 0:
495 axes = [self.axes % len(shape1), self.axes % len(shape2)]
497 axes = [self.axes] * 2
[all …]
/external/guava/guava/src/com/google/common/collect/
DCartesianList.java37 private transient final ImmutableList<List<E>> axes; field in CartesianList
53 CartesianList(ImmutableList<List<E>> axes) { in CartesianList() argument
54 this.axes = axes; in CartesianList()
55 int[] axesSizeProduct = new int[axes.size() + 1]; in CartesianList()
56 axesSizeProduct[axes.size()] = 1; in CartesianList()
58 for (int i = axes.size() - 1; i >= 0; i--) { in CartesianList()
60 IntMath.checkedMultiply(axesSizeProduct[i + 1], axes.get(i).size()); in CartesianList()
70 return (index / axesSizeProduct[axis + 1]) % axes.get(axis).size(); in getAxisIndexForProductIndex()
80 return axes.size(); in get()
87 return axes.get(axis).get(axisIndex); in get()
[all …]
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dreverse_op.cc92 std::vector<int64> axes; in Compile() local
93 OP_REQUIRES_OK(ctx, ctx->ConstantInputAsIntVector(1, &axes)); in Compile()
99 for (int d = 0; d < axes.size(); ++d) { in Compile()
101 ctx, (-x_shape.dims() <= axes[d]) && (axes[d] < x_shape.dims()), in Compile()
102 errors::InvalidArgument(axes[d], " is out of range [-", in Compile()
106 if (axes[d] < 0) { in Compile()
107 axes[d] += x_shape.dims(); in Compile()
109 OP_REQUIRES(ctx, !witnessed_axes[axes[d]], in Compile()
110 errors::InvalidArgument("canonicalized axis ", axes[d], in Compile()
112 witnessed_axes[axes[d]] = true; in Compile()
[all …]
/external/fonttools/Lib/fontTools/varLib/
Dplot.py25 def _plotLocationsDots(locations, axes, subplot, **kwargs): argument
27 if len(axes) == 1:
29 [loc.get(axes[0], 0)],
35 elif len(axes) == 2:
37 [loc.get(axes[0], 0)],
38 [loc.get(axes[1], 0)],
45 raise AssertionError(len(axes))
59 axes = sorted(locations[0].keys())
60 if len(axes) == 1:
62 model, axes[0], fig, cols, rows, names=names, **kwargs
[all …]
D__init__.py56 def _add_fvar(font, axes, instances): argument
66 assert axes
67 assert isinstance(axes, OrderedDict)
74 for a in axes.values():
81 fvar.axes.append(axis)
100 inst.coordinates = {axes[k].tag:axes[k].map_backward(v) for k,v in coordinates.items()}
109 def _add_avar(font, axes): argument
116 assert axes
117 assert isinstance(axes, OrderedDict)
124 for axis in axes.values():
[all …]
/external/tensorflow/tensorflow/core/kernels/
Dreduction_ops_test.cc31 Tensor axes(DT_INT32, TensorShape({2})); in ToScalar() local
32 axes.flat<int32>()(0) = 0; in ToScalar()
33 axes.flat<int32>()(1) = 1; in ToScalar()
35 test::graph::Constant(g, axes)); in ToScalar()
43 Tensor axes(DT_INT32, TensorShape({1})); in ColReduce() local
44 axes.flat<int32>()(0) = 0; in ColReduce()
46 test::graph::Constant(g, axes)); in ColReduce()
54 Tensor axes(DT_INT32, TensorShape({1})); in RowReduce() local
55 axes.flat<int32>()(0) = 1; in RowReduce()
57 test::graph::Constant(g, axes)); in RowReduce()
[all …]
Dscan_ops_test.cc29 Tensor axes(DT_INT32, TensorShape({})); in LargeOneDCumsum() local
30 axes.flat<int32>()(0) = 0; in LargeOneDCumsum()
32 test::graph::Constant(g, axes)); in LargeOneDCumsum()
40 Tensor axes(DT_INT32, TensorShape({})); in ColCumsum() local
41 axes.flat<int32>()(0) = 0; in ColCumsum()
43 test::graph::Constant(g, axes)); in ColCumsum()
51 Tensor axes(DT_INT32, TensorShape({})); in RowCumsum() local
52 axes.flat<int32>()(0) = 1; in RowCumsum()
54 test::graph::Constant(g, axes)); in RowCumsum()
62 Tensor axes(DT_INT32, TensorShape({})); in ThreeDYCumsum() local
[all …]
/external/libvpx/libvpx/tools/non_greedy_mv/
Dnon_greedy_mv.py144 fig, axes = plt.subplots(2, 2) variable
146 axes[0][0].imshow(img)
147 draw_mv_ls(axes[0][0], mv_ls)
148 draw_pred_block_ls(axes[0][0], mv_ls, bs, mode=0)
150 axes[0][0].set_ylim(img.shape[0], 0)
151 axes[0][0].set_xlim(0, img.shape[1])
154 axes[0][1].imshow(ref)
155 draw_mv_ls(axes[0][1], mv_ls, mode=1)
156 draw_pred_block_ls(axes[0][1], mv_ls, bs, mode=1)
158 axes[0][1].set_ylim(ref.shape[0], 0)
[all …]
/external/tensorflow/tensorflow/contrib/opt/python/training/
Dshampoo_test.py193 np.tensordot(grad_np, grad_np, axes=([1, 2], [1, 2])) /
197 np.tensordot(grad_np, grad_np, axes=([0, 2], [0, 2])) /
201 np.tensordot(grad_np, grad_np, axes=([0, 1], [0, 1])) /
205 precond_grad = np.tensordot(grad_np, mat_g1_a, axes=([0], [0]))
206 precond_grad = np.tensordot(precond_grad, mat_g2_a, axes=([0], [0]))
207 precond_grad = np.tensordot(precond_grad, mat_g3_a, axes=([0], [0]))
218 np.tensordot(grad_np_2, grad_np_2, axes=([1, 2], [1, 2])) /
222 np.tensordot(grad_np_2, grad_np_2, axes=([0, 2], [0, 2])) /
226 np.tensordot(grad_np_2, grad_np_2, axes=([0, 1], [0, 1])) /
230 precond_grad = np.tensordot(grad_np_2, mat_g1_a, axes=([0], [0]))
[all …]
/external/tensorflow/tensorflow/python/kernel_tests/
Dtensordot_op_test.py113 for axes in ([1], [0]), 1:
116 output = math_ops.tensordot(a, b, axes)
120 output = math_ops.tensordot(a, b, axes)
130 output = math_ops.tensordot(a, b, axes)
172 np_ans = np.tensordot(a_np, b_np, axes=(a_dims_np, b_dims_np))
177 axes = array_ops.placeholder(dtypes.int32)
178 c = math_ops.tensordot(a, b, axes)
183 axes: (a_dims_np, b_dims_np)
207 for axes in all_axes:
208 np_ans = np.tensordot(a_np, b_np, axes=axes)
[all …]
/external/fonttools/Lib/fontTools/ttLib/tables/
D_f_v_a_r.py46 self.axes = []
50 instanceSize = sstruct.calcsize(FVAR_INSTANCE_FORMAT) + (len(self.axes) * 4)
59 "axisCount": len(self.axes),
65 result.extend([axis.compile() for axis in self.axes])
66 axisTags = [axis.axisTag for axis in self.axes]
82 self.axes.append(axis)
85 axisTags = [axis.axisTag for axis in self.axes]
93 for axis in self.axes:
102 self.axes.append(axis)
201 for axis in ttFont["fvar"].axes:
DTupleVariation.py33 def __init__(self, axes, coordinates): argument
34 self.axes = axes.copy()
38 axes = ",".join(sorted(["%s=%s" % (name, value) for (name, value) in self.axes.items()]))
39 return "<TupleVariation %s %s>" % (axes, self.coordinates)
42 return self.coordinates == other.coordinates and self.axes == other.axes
66 value = self.axes.get(axis)
111 self.axes[axis] = (minValue, value, maxValue)
129 …assert all(tag in axisTags for tag in self.axes.keys()), ("Unknown axis tag found.", self.axes.key…
160 _minValue, value, _maxValue = self.axes.get(axis, (0.0, 0.0, 0.0))
167 minValue, value, maxValue = self.axes.get(axis, (0.0, 0.0, 0.0))
[all …]
/external/tensorflow/tensorflow/python/keras/engine/
Dinput_spec.py56 axes=None): argument
65 self.axes = axes or {}
73 ('axes=' + str(self.axes)) if self.axes else '']
149 if spec.axes:
152 for axis, value in spec.axes.items():
/external/fonttools/Tests/ttLib/tables/
DTupleVariation_test.py88 axes = {"wght":(0.0, 1.0, 1.0)}
89 var = TupleVariation(axes, [(0,0), (9,8), (7,6)])
93 axes = {"wght":(0.0, 1.0, 1.0)}
94 var = TupleVariation(axes, [(0,0), (0,0), (0,0)])
98 axes = {"wght":(0.0, 1.0, 1.0)}
99 var = TupleVariation(axes, [None, None, None])
149 axes = {"wght":(0.0, 1.0, 1.0)}
150 g = TupleVariation(axes, [None] * 5)
176 self.assertEqual(AXES, g.axes)
188 self.assertEqual(AXES, g.axes)
[all …]

12345678910