!14915 fix gpu conv2d test

From: @zhaodezan
Reviewed-by: @hangangqiang,@ddwsky
Signed-off-by: @zhanghaibo5
This commit is contained in:
mindspore-ci-bot 2021-04-13 20:03:28 +08:00 committed by Gitee
commit 9754f7671c
3 changed files with 5 additions and 4 deletions

View File

@ -20,7 +20,7 @@
int Deconv2dInferShape(const TensorC *const *inputs, size_t inputs_size, TensorC **outputs, size_t outputs_size,
OpParameter *parameter) {
#ifdef Debug
int check_ret = CheckAugmentNull(inputs, inputs_size, outputs, outputs_size, parameter);
int check_ret = CheckAugmentNullInputSize(inputs, inputs_size, outputs, outputs_size, parameter, 2);
if (check_ret != NNACL_OK) {
return check_ret;
}

View File

@ -14,8 +14,8 @@
* limitations under the License.
*/
#ifndef MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_RESHAPE_H_
#define MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_RESHAPE_H_
#ifndef MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_L2_NORM_H_
#define MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_L2_NORM_H_
#include <vector>
#include "src/lite_kernel.h"
@ -57,4 +57,4 @@ class L2NormCPUKernel : public LiteKernel {
};
} // namespace mindspore::kernel
#endif // MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_RESHAPE_H_
#endif // MINDSPORE_LITE_SRC_RUNTIME_KERNEL_ARM_FP32_L2_NORM_H_

View File

@ -39,6 +39,7 @@ ConvParameter *CreateParameter(const std::string &attr, ActType act_type) {
void TestMain_Conv2D(const std::string &attr, float *input_data, float *weight_data, float *bias_data,
float *output_data, ActType act_type, bool fp16_enable, float atol = 1e-9) {
auto *param = CreateParameter(attr, act_type);
param->group_ = 1; // group conv is not supported in this test
std::vector<int> input_shape = {param->input_batch_, param->input_h_, param->input_w_, param->input_channel_};
std::vector<int> weight_shape = {param->output_channel_, param->kernel_h_, param->kernel_w_, param->input_channel_};
std::vector<int> bias_shape = {param->output_channel_};