diff options
Diffstat (limited to 'tensorflow/core/kernels/data/dense_to_sparse_batch_dataset_op.cc')
-rw-r--r-- | tensorflow/core/kernels/data/dense_to_sparse_batch_dataset_op.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tensorflow/core/kernels/data/dense_to_sparse_batch_dataset_op.cc b/tensorflow/core/kernels/data/dense_to_sparse_batch_dataset_op.cc index da4b14c8b9..9770bc025d 100644 --- a/tensorflow/core/kernels/data/dense_to_sparse_batch_dataset_op.cc +++ b/tensorflow/core/kernels/data/dense_to_sparse_batch_dataset_op.cc @@ -76,11 +76,11 @@ class DenseToSparseBatchDatasetOp : public UnaryDatasetOpKernel { private: // TODO(mrry): Push the templated code down to the raw copying routine. template <class T> - class Dataset : public GraphDatasetBase { + class Dataset : public DatasetBase { public: Dataset(OpKernelContext* ctx, int64 batch_size, const PartialTensorShape& row_shape, const DatasetBase* input) - : GraphDatasetBase(ctx), + : DatasetBase(DatasetContext(ctx)), batch_size_(batch_size), row_shape_(row_shape), input_(input) { @@ -115,10 +115,11 @@ class DenseToSparseBatchDatasetOp : public UnaryDatasetOpKernel { } protected: - Status AsGraphDefInternal(OpKernelContext* ctx, DatasetGraphDefBuilder* b, + Status AsGraphDefInternal(SerializationContext* ctx, + DatasetGraphDefBuilder* b, Node** output) const override { Node* input_node; - TF_RETURN_IF_ERROR(b->AddParentDataset(ctx, input_, &input_node)); + TF_RETURN_IF_ERROR(b->AddInputDataset(ctx, input_, &input_node)); Node* batch_size_node; TF_RETURN_IF_ERROR(b->AddScalar(batch_size_, &batch_size_node)); Node* row_shape_node; @@ -273,14 +274,14 @@ class DenseToSparseBatchDatasetOp : public UnaryDatasetOpKernel { protected: Status SaveInternal(IteratorStateWriter* writer) override { mutex_lock l(mu_); - TF_RETURN_IF_ERROR(Iterator::SaveParent(writer, input_impl_)); + TF_RETURN_IF_ERROR(Iterator::SaveInput(writer, input_impl_)); return Status::OK(); } Status RestoreInternal(IteratorContext* ctx, IteratorStateReader* reader) override { mutex_lock l(mu_); - TF_RETURN_IF_ERROR(Iterator::RestoreParent(ctx, reader, input_impl_)); + TF_RETURN_IF_ERROR(Iterator::RestoreInput(ctx, reader, input_impl_)); return Status::OK(); } |