batch_dataset_op.cc
imports tensorflow/core/platform/macros.himports tensorflow/core/platform/stringprintf.h
SHA-25644b65deed73ed5b95cdd369d351ea5ef14c6811bf7e34b3cd326151a566c5290
MaleculeH(Db)Md(In₄)
Evidence
1/* Copyright 2017 The TensorFlow Authors. All Rights Reserved.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is …
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15#include "tensorflow/core/kernels/data/batch_dataset_op.h"
16
17#include <algorithm>
18#include <cstdlib>
19#include <memory>
20#include <optional>
21#include <utility>
22#include <vector>
23
24#include "absl/status/status.h"
25#include "absl/status/statusor.h"
26#include "absl/strings/str_cat.h"
27#include "xla/tsl/platform/statusor.h"
28#include "tensorflow/core/data/dataset_utils.h"
29#include "tensorflow/core/data/global_shuffle_utils.h"
30#include "tensorflow/core/data/name_utils.h"
31#include "tensorflow/core/framework/dataset.h"
32#include "tensorflow/core/framework/op_kernel.h"
33#include "tensorflow/core/framework/partial_tensor_shape.h"
34#include "tensorflow/core/framework/tensor.h"
35#include "tensorflow/core/lib/gtl/cleanup.h"
36#include "tensorflow/core/platform/macros.h"
37#include "tensorflow/core/platform/stringprintf.h"
38#include "tensorflow/core/util/batch_util.h"
39#include "tsl/platform/mutex.h"
40
41namespace tensorflow {
⋯4 lines
53:20… xpr const char* const BatchDatasetOp::kOutputShapes;
54
55constexpr char kInputImplEmpty[] = "input_impl_empty";
56constexpr char kBatchDataset[] = "BatchDataset";
57
58class BatchDatasetOp::Dataset : public DatasetBase {
59 public:
60 Dataset(OpKernelContext* ctx, int64_t batch …
81:55… " semantics. If
82 // we could tell statically that the input dataset is infinite,
83 // then we could always report `batch_size` as the 0th dimen …