From 17081ef5484153cec6807b7538e3566c52178be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E4=B8=96=E6=B3=A2?= <2783626707@qq.com> Date: Sun, 19 Nov 2023 08:33:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E8=BF=9Bmain.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index a12535d..6347dd5 100644 --- a/main.c +++ b/main.c @@ -80,7 +80,7 @@ double Max(double a, double b){ */ double sigmoid(double x){ //请补全sigmod函数的计算结果 - + return 1 / (1 + exp(-x)); } @@ -143,7 +143,16 @@ Sample * getTestData(const char * filename){ * @param size 样本大小 */ void printData(Sample * data, int size){ - int count + if (data != NULL) { + int count = 0; + while (countin[count][0], data->in[count][1], data->out[count][0]); + count++; + } + } + else { + printf("sample is empty!\n"); + } } /**