Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix breakage in parameterized_truncated_normal_op.cc
PiperOrigin-RevId: 372041718
Change-Id: Iff79e77a2bb27032423eefcb84211627b27dfe81
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed May 5, 2021
1 parent 3f6fe4d commit 5e52ef5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tensorflow/core/kernels/parameterized_truncated_normal_op.cc
Expand Up @@ -627,6 +627,9 @@ class ParameterizedTruncatedNormalOp : public OpKernel {
ctx, TensorShapeUtils::IsVector(shape_tensor.shape()),
errors::InvalidArgument("Input shape should be a vector, got shape: ",
shape_tensor.shape().DebugString()));
OP_REQUIRES(ctx, shape_tensor.NumElements() > 0,
errors::InvalidArgument("Shape tensor must not be empty, got ",
shape_tensor.DebugString()));
int32 num_batches = shape_tensor.flat<int32>()(0);

int32 samples_per_batch = 1;
Expand Down

0 comments on commit 5e52ef5

Please sign in to comment.