Home
last modified time | relevance | path

Searched refs:slice_spec (Results 1 – 21 of 21) sorted by relevance

/external/tensorflow/tensorflow/python/ops/structured/
Dstructured_tensor_slice_test.py40 def __getitem__(self, slice_spec): argument
41 return slice_spec
49 def _make_tensor_slice_spec(slice_spec, use_constant=True): argument
78 if isinstance(slice_spec, tuple):
79 return tuple(make_piece_scalar(piece) for piece in slice_spec)
81 return make_piece_scalar(slice_spec)
156 def _TestGetItem(self, struct, slice_spec, expected): argument
175 tensor_slice_spec1 = _make_tensor_slice_spec(slice_spec, True)
176 tensor_slice_spec2 = _make_tensor_slice_spec(slice_spec, False)
177 value1 = struct.__getitem__(slice_spec)
[all …]
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_getitem_test.py43 def __getitem__(self, slice_spec): argument
44 return slice_spec
50 def _make_tensor_slice_spec(slice_spec, use_constant=True): argument
79 if isinstance(slice_spec, tuple):
80 return tuple(make_piece_scalar(piece) for piece in slice_spec)
82 return make_piece_scalar(slice_spec)
125 def _TestGetItem(self, rt, slice_spec, expected, expected_shape=None): argument
145 tensor_slice_spec1 = _make_tensor_slice_spec(slice_spec, True)
146 tensor_slice_spec2 = _make_tensor_slice_spec(slice_spec, False)
147 value1 = rt.__getitem__(slice_spec)
[all …]
/external/tensorflow/tensorflow/python/distribute/
Dsharded_variable.py329 def __getitem__(self, slice_spec): argument
350 if (isinstance(slice_spec, bool) or (isinstance(slice_spec, ops.Tensor) and
351 slice_spec.dtype == dtypes.bool) or
352 (isinstance(slice_spec, np.ndarray) and slice_spec.dtype == bool)):
354 return array_ops.boolean_mask(tensor=tensor, mask=slice_spec)
356 if not isinstance(slice_spec, (list, tuple)):
357 slice_spec = (slice_spec,)
359 s = slice_spec[0]
365 all_dim_slice_spec = (first_dim_slice_specs[i],) + slice_spec[1:]
375 return array_ops.concat([var[slice_spec] for var in self._variables],
[all …]
Dvalues_util.py77 slice_spec="",
109 slice_spec="",
/external/tensorflow/tensorflow/python/training/saving/
Dsaveable_object.py24 def __init__(self, tensor, slice_spec, name, dtype=None, device=None): argument
38 self.slice_spec = slice_spec
Dsaveable_object_util.py73 def __init__(self, var, slice_spec, name): argument
74 spec = saveable_object.SaveSpec(var, slice_spec, name, dtype=var.dtype)
91 def __init__(self, var, slice_spec, name): argument
120 spec = saveable_object.SaveSpec(tensor, slice_spec, name,
409 "slice_spec": spec.slice_spec})
Dfunctional_saver.py80 tensor_slices.append(spec.slice_spec)
104 restore_specs.append((spec.name, spec.slice_spec, spec.dtype))
/external/tensorflow/tensorflow/python/ops/numpy_ops/
Dnp_array_ops.py1507 def _slice_helper(tensor, slice_spec, update_method=None, updates=None): argument
1550 for index, s in enumerate(slice_spec):
1671 dim = index - len(slice_spec) + num_shrink
1776 def _as_spec_tuple(slice_spec): argument
1778 if isinstance(slice_spec,
1779 (list, tuple)) and not isinstance(slice_spec, np.ndarray):
1781 for s in slice_spec:
1789 return tuple(slice_spec)
1790 return (slice_spec,)
1793 def _getitem(self, slice_spec): argument
[all …]
Dnp_utils.py633 def getitem(a, slice_spec): argument
635 return _maybe_static(a)[slice_spec]
/external/tensorflow/tensorflow/core/util/tensor_bundle/
Dtensor_bundle.cc352 bool IsFullSlice(const TensorSlice& slice_spec, in IsFullSlice() argument
354 if (slice_spec.IsFull()) { in IsFullSlice()
358 slice_spec.SliceTensorShape(full_tensor_shape, &sliced_shape).IgnoreError(); in IsFullSlice()
478 const TensorSlice& slice_spec, in AddSlice() argument
484 if (IsFullSlice(slice_spec, full_tensor_shape)) { in AddSlice()
507 slice_spec.AsProto(slice_proto); in AddSlice()
512 checkpoint::EncodeTensorNameSlice(full_tensor_key_string, slice_spec); in AddSlice()
984 const TensorSlice& slice_spec, Tensor* val) { in LookupSlice() argument
988 return GetSliceValue(full_tensor_key, entry, slice_spec, val); in LookupSlice()
993 const TensorSlice& slice_spec, Tensor* val) { in GetSliceValue() argument
[all …]
Dtensor_bundle.h141 const TensorSlice& slice_spec, const Tensor& slice_tensor);
244 Status LookupSlice(StringPiece full_tensor_key, const TensorSlice& slice_spec,
283 const TensorSlice& slice_spec,
/external/tensorflow/tensorflow/python/ops/
Dboosted_trees_ops.py79 slice_spec = ''
83 return saver.BaseSaverBuilder.SaveSpec(tensor, slice_spec, name + suffix)
181 slice_spec = ''
183 saver.BaseSaverBuilder.SaveSpec(stamp_token, slice_spec,
185 saver.BaseSaverBuilder.SaveSpec(serialized, slice_spec,
Dtensor_forest_ops.py43 slice_spec = ''
44 specs = [saver.BaseSaverBuilder.SaveSpec(tensor, slice_spec, name)]
Darray_ops.py896 def _slice_helper(tensor, slice_spec, var=None): argument
967 return tensor._numpy_style_getitem(slice_spec) # pylint: disable=protected-access
969 if isinstance(slice_spec, bool) or \
970 (isinstance(slice_spec, ops.Tensor) and slice_spec.dtype == dtypes.bool) or \
971 (isinstance(slice_spec, np.ndarray) and slice_spec.dtype == bool):
972 return boolean_mask(tensor=tensor, mask=slice_spec)
974 if not isinstance(slice_spec, (list, tuple)):
975 slice_spec = [slice_spec]
983 for s in slice_spec:
1251 def _SliceHelperVar(var, slice_spec): argument
[all …]
/external/tensorflow/tensorflow/tools/api/golden/v2/
Dtensorflow.__operators__.pbtxt13 …argspec: "args=[\'tensor\', \'slice_spec\', \'var\'], varargs=None, keywords=None, defaults=[\'Non…
/external/tensorflow/tensorflow/python/training/
Dcheckpoint_utils.py406 slice_spec, argument
427 ckpt_file, [tensor_name], [slice_spec], [base_type], name=name)[0]
Dsaver.py110 tensor_slices.append(spec.slice_spec)
175 io_ops.restore_v2(filename_tensor, [spec.name], [spec.slice_spec],
578 restore_specs.append((spec.name, spec.slice_spec, spec.dtype))
/external/tensorflow/tensorflow/python/kernel_tests/array_ops/
Dunstack_op_test.py60 slice_spec = tuple(
62 result.append(data.__getitem__(slice_spec))
/external/tensorflow/tensorflow/python/distribute/parallel_device/
Dsaving.py39 slice_spec="",
/external/tensorflow/tensorflow/python/training/tracking/
Dbase.py105 slice_spec = ":".join(
107 shape_and_slice = full_shape_str + slice_spec
Dutil_test.py175 slice_spec="",