代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/tensorflow 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From ecf768cbe50cedc0a45ce1ee223146a3d3d26d23 Mon Sep 17 00:00:00 2001
From: Mihai Maruseac <mihaimaruseac@google.com>
Date: Wed, 5 May 2021 12:07:57 -0700
Subject: [PATCH] Add missing validations to reverse_sequence_op
PiperOrigin-RevId: 372178683
Change-Id: Iac97ebab5b342f1262c77a7d9bcb4267b305ce5b
---
tensorflow/core/kernels/reverse_sequence_op.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tensorflow/core/kernels/reverse_sequence_op.cc b/tensorflow/core/kernels/reverse_sequence_op.cc
index b5b62bc76ca52..1282deb26e8cd 100644
--- a/tensorflow/core/kernels/reverse_sequence_op.cc
+++ b/tensorflow/core/kernels/reverse_sequence_op.cc
@@ -115,6 +115,10 @@ class ReverseSequenceOp : public OpKernel {
: OpKernel(context) {
OP_REQUIRES_OK(context, context->GetAttr("batch_dim", &batch_dim_));
OP_REQUIRES_OK(context, context->GetAttr("seq_dim", &seq_dim_));
+ OP_REQUIRES(context, batch_dim_ >= 0,
+ errors::InvalidArgument("Invalid batch_dim ", batch_dim_));
+ OP_REQUIRES(context, seq_dim_ >= 0,
+ errors::InvalidArgument("Invalid seq_dim ", seq_dim_));
}
void Compute(OpKernelContext* context) override {
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。