mirror of
https://github.com/Tencent/ncnn.git
synced 2026-10-18 13:42:18 +08:00
5ea98309e3
* harden layer parameter validation Original patches and author identities: https://github.com/Tencent/ncnn/pull/6912 (beilzx) https://github.com/Tencent/ncnn/pull/6919 (FluxMind-O) https://github.com/Tencent/ncnn/pull/6928 (lxcxjxhx) https://github.com/Tencent/ncnn/pull/6948 (ktz03) https://github.com/Tencent/ncnn/pull/6950 (ktz03) https://github.com/Tencent/ncnn/pull/6971 (LI) https://github.com/Tencent/ncnn/pull/6974 (LI) https://github.com/Tencent/ncnn/pull/6977 (LI) Co-authored-by: beilzx <2069360659@qq.com> Co-authored-by: FluxMind-O <3283918317@qq.com> Co-authored-by: lxcxjxhx <lxcxjxhx@users.noreply.github.com> Co-authored-by: ktz03 <2484593937@qq.com> Co-authored-by: LI <2484593937@qq.com>
32 lines
584 B
C++
32 lines
584 B
C++
// Copyright 2026 Tencent
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
#include "testutil.h"
|
|
|
|
#include "layer_type.h"
|
|
|
|
#if NCNN_VALIDATION
|
|
static int test_gemm_load_param()
|
|
{
|
|
ncnn::ParamDict base;
|
|
base.set(4, 1);
|
|
base.set(7, 8);
|
|
base.set(9, 8);
|
|
if (test_layer_param(ncnn::LayerType::Gemm, base, 0) != 0)
|
|
return -1;
|
|
|
|
return test_layer_param(ncnn::LayerType::Gemm, base, 7, -1, -1);
|
|
}
|
|
#endif // NCNN_VALIDATION
|
|
|
|
int main()
|
|
{
|
|
SRAND(7767517);
|
|
|
|
return 0
|
|
#if NCNN_VALIDATION
|
|
|| test_gemm_load_param()
|
|
#endif // NCNN_VALIDATION
|
|
;
|
|
}
|