代码拉取完成,页面将自动刷新
同步操作将从 openEuler-RISC-V/tensorflow 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 744009c9e5cc5d0447f0dc39d055f917e1fd9e16 Mon Sep 17 00:00:00 2001
From: Mihai Maruseac <mihaimaruseac@google.com>
Date: Fri, 23 Apr 2021 12:00:12 -0700
Subject: [PATCH] Validate work in `QuantizedAdd`, ensure at least one element.
PiperOrigin-RevId: 370127996
Change-Id: I57c6f3e01afdeada84737820a131590137463855
---
tensorflow/core/kernels/quantized_add_op.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tensorflow/core/kernels/quantized_add_op.cc b/tensorflow/core/kernels/quantized_add_op.cc
index 55c69de7d3ea6..b186f00f15c06 100644
--- a/tensorflow/core/kernels/quantized_add_op.cc
+++ b/tensorflow/core/kernels/quantized_add_op.cc
@@ -538,6 +538,8 @@ class QuantizedAddOp : public OpKernel {
tensor_min = min_x;
tensor_max = max_x;
}
+ OP_REQUIRES(context, vector_num_elements > 0,
+ errors::InvalidArgument("Must have some elements to add"));
VectorTensorAddition<T, Toutput>(
vector_data, vector_min, vector_max, vector_num_elements, tensor_data,
tensor_min, tensor_max, tensor_num_elements, min_z_value, max_z_value,
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。