Merge pull request #25884 from PariksheetPinjari909:fixed_warning

PiperOrigin-RevId: 247772570
This commit is contained in:
TensorFlower Gardener 2019-05-11 13:16:29 -07:00
commit 96d69ba0ee
8 changed files with 10 additions and 10 deletions

View File

@ -61,7 +61,7 @@ class CSVDatasetOp : public DatasetOpKernel {
OP_REQUIRES(ctx, select_cols_tensor->dims() == 1,
errors::InvalidArgument("`select_cols` must be a vector."));
int64 buffer_size;
int64 buffer_size = 0;
OP_REQUIRES_OK(
ctx, ParseScalarArgument<int64>(ctx, "buffer_size", &buffer_size));
OP_REQUIRES(ctx, buffer_size > 0,

View File

@ -61,13 +61,13 @@ class MapAndBatchDatasetOp : public UnaryDatasetOpKernel {
protected:
void MakeDataset(OpKernelContext* ctx, DatasetBase* input,
DatasetBase** output) override {
int64 batch_size;
int64 batch_size = 0;
OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, "batch_size", &batch_size));
OP_REQUIRES(
ctx, batch_size > 0,
errors::InvalidArgument("batch_size must be greater than zero."));
int64 num_parallel_calls;
int64 num_parallel_calls = 0;
OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, "num_parallel_calls",
&num_parallel_calls));
OP_REQUIRES(

View File

@ -72,7 +72,7 @@ class ParseExampleDatasetOp : public UnaryDatasetOpKernel {
protected:
void MakeDataset(OpKernelContext* ctx, DatasetBase* input,
DatasetBase** output) override {
int64 num_parallel_calls;
int64 num_parallel_calls = 0;
OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, "num_parallel_calls",
&num_parallel_calls));
OP_REQUIRES(ctx, num_parallel_calls > 0,

View File

@ -267,7 +267,7 @@ class SlidingWindowDatasetOp : public UnaryDatasetOpKernel {
input_impl_.reset();
}
// Restore buffer.
int64 buffer_size;
int64 buffer_size = 0;
TF_RETURN_IF_ERROR(
reader->ReadScalar(strings::StrCat("buffer_size"), &buffer_size));
buffer_.resize(buffer_size);

View File

@ -77,7 +77,7 @@ class ParallelInterleaveDatasetOp : public UnaryDatasetOpKernel {
OP_REQUIRES(ctx, block_length > 0,
errors::InvalidArgument("`block_length` must be > 0"));
int64 num_parallel_calls;
int64 num_parallel_calls = 0;
OP_REQUIRES_OK(ctx, ParseScalarArgument(ctx, "num_parallel_calls",
&num_parallel_calls));
OP_REQUIRES(

View File

@ -434,7 +434,7 @@ class PrefetchDatasetOp::Dataset : public DatasetBase {
void PrefetchDatasetOp::MakeDataset(OpKernelContext* ctx, DatasetBase* input,
DatasetBase** output) {
int64 buffer_size;
int64 buffer_size = 0;
OP_REQUIRES_OK(ctx,
ParseScalarArgument<int64>(ctx, "buffer_size", &buffer_size));
OP_REQUIRES(ctx,

View File

@ -364,7 +364,7 @@ class ShuffleDatasetOp : public ShuffleDatasetOpBase {
void MakeDataset(OpKernelContext* ctx, DatasetBase* input,
DatasetBase** output) override {
int64 buffer_size;
int64 buffer_size = 0;
OP_REQUIRES_OK(
ctx, ParseScalarArgument<int64>(ctx, "buffer_size", &buffer_size));
OP_REQUIRES(
@ -637,7 +637,7 @@ class ShuffleAndRepeatDatasetOp : public ShuffleDatasetOpBase {
void MakeDataset(OpKernelContext* ctx, DatasetBase* input,
DatasetBase** output) override {
int64 buffer_size;
int64 buffer_size = 0;
OP_REQUIRES_OK(
ctx, ParseScalarArgument<int64>(ctx, "buffer_size", &buffer_size));
OP_REQUIRES(

View File

@ -298,7 +298,7 @@ class WindowDatasetOp : public UnaryDatasetOpKernel {
input_impl_.reset();
}
// Restore buffer.
int64 buffer_size;
int64 buffer_size = 0;
TF_RETURN_IF_ERROR(
reader->ReadScalar(strings::StrCat("buffer_size"), &buffer_size));
buffer_.resize(buffer_size);