mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 00:19:58 +01:00
Use OP_REQUIRES instead of an assertion to validate op arguments
PiperOrigin-RevId: 163841759
This commit is contained in:
parent
203c3f5fd4
commit
90abbf6849
|
|
@ -183,7 +183,7 @@ class FixedLengthRecordReaderOp : public ReaderOpKernel {
|
|||
errors::InvalidArgument("hop_bytes must be >= 0 not ", hop_bytes));
|
||||
Env* env = context->env();
|
||||
string encoding;
|
||||
TF_CHECK_OK(context->GetAttr("encoding", &encoding));
|
||||
OP_REQUIRES_OK(context, context->GetAttr("encoding", &encoding));
|
||||
SetReaderFactory([this, header_bytes, record_bytes, footer_bytes, hop_bytes,
|
||||
encoding, env]() {
|
||||
return new FixedLengthRecordReader(name(), header_bytes, record_bytes,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user