Skip to content

Commit

Permalink
Fixing a compatibility issue with newer TensorFlow versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lnstadrum committed Mar 27, 2024
1 parent aafd894 commit 88df576
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tensorflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class FastAugmentTFOpKernel : public OpKernel,
size_t getPair(OpKernelConstruction *context, const char *attribute, float &a, float &b)
{
std::vector<float> listArg;
if (context->GetAttr(attribute, &listArg) != Status::OK())
if (!context->GetAttr(attribute, &listArg).ok())
{
context->CtxFailure(
errors::InvalidArgument("Cannot get '" + std::string(attribute) +
Expand Down Expand Up @@ -288,5 +288,5 @@ REGISTER_OP("Augment")

ctx->set_output(1, ctx->input(1));

return Status::OK();
return Status();
});

0 comments on commit 88df576

Please sign in to comment.