Returns whether "slice_spec" is a full slice, with respect to the full shape. This can happen say, when "slice_spec" is "TensorSlice(full_tensor_shape.dims())", or when it is "TensorSlice({{0, dim(0)}, ..., {0, dim(N)}})" -- a degenerate case we need to guard against.
| 343 | // "TensorSlice(full_tensor_shape.dims())", or when it is "TensorSlice({{0, |
| 344 | // dim(0)}, ..., {0, dim(N)}})" -- a degenerate case we need to guard against. |
| 345 | bool IsFullSlice(const TensorSlice& slice_spec, |
| 346 | const TensorShape& full_tensor_shape) { |
| 347 | if (slice_spec.IsFull()) { |
| 348 | return true; |
| 349 | } else { |
| 350 | TensorShape sliced_shape; |
| 351 | slice_spec.SliceTensorShape(full_tensor_shape, &sliced_shape).IgnoreError(); |
| 352 | return sliced_shape == full_tensor_shape; |
| 353 | } |
| 354 | } |
| 355 | |
| 356 | Status CorruptFileError(const Status& in_status, const string& filename, |
| 357 | const string& detail) { |
no test coverage detected