⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nndisply.c

📁 基于MATLAB完成的神经网络源程序 大家
💻 C
字号:
/*-----------------------------------------------------------------------*
 * Greg Stevens                                                  6/24/93 *
 *                               nndisply.c                              *
 *                                             [file 4 in a series of 6] *
 *                                                                       *
 *  This file contains a series of functions for displaying different    *
 * values for nodes and weights in the network on the screen.            *
 *                                                                       *
 *  This file assumes the following declared in nnstruct:                *
 *                               NUMNODES[]  number nodes in each layer  *
 *                                                                       *
 *                                                                       *
 *-----------------------------------------------------------------------*/
#include "nnstruct.c"                 /* for access to net information   */
#include "stdio.h"                    /* for printf function             */

/* Function Display Layer displays layer Layer of net N formatted to width */
/* W, where W is a number of nodes.                                        */

/* prototype for function */
void DisplayLayer( NNETtype N, int Layer, int W );


/* function definition */
void DisplayLayer( NNETtype N, int Layer, int W )
{
   int u;                             /* looping variable for units      */

   if (Layer==0)                      /* tags which layer is outputted   */
     printf( " I:" );
   else if (Layer==(NUMLAYERS-1))
     printf( " O:" );
   else
     printf( "H%d:", Layer );

   for (u=0; (u<NUMNODES[Layer]); ++u)             /* show activations   */
     {
       printf( "%6.2f", N.unit[Layer][u].state );
       if (  (((u+1) % W)==0)  && ((u+1)!=NUMNODES[Layer])  )
         printf( "\n   " );
     }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -