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

📄 form1.frm

📁 是关于MATALB 神经网络与VB的混合编程,希望对大家有所帮助
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form1 
   Caption         =   "神经元网络子平台"
   ClientHeight    =   6825
   ClientLeft      =   60
   ClientTop       =   630
   ClientWidth     =   9765
   FillColor       =   &H8000000F&
   LinkTopic       =   "Form1"
   ScaleHeight     =   6825
   ScaleWidth      =   9765
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Frame2 
      Caption         =   "样本值"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   1455
      Left            =   840
      TabIndex        =   9
      Top             =   4200
      Width           =   3615
      Begin VB.ListBox Sample 
         BackColor       =   &H80000013&
         Height          =   1035
         Left            =   120
         TabIndex        =   10
         Top             =   240
         Width           =   3375
      End
   End
   Begin MSComDlg.CommonDialog CommonDialog1 
      Left            =   9120
      Top             =   6000
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Caption         =   "初始权值"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   1455
      Left            =   5280
      TabIndex        =   3
      Top             =   4200
      Width           =   3975
      Begin VB.ListBox LW 
         BackColor       =   &H80000013&
         Height          =   1035
         Left            =   120
         TabIndex        =   4
         Top             =   240
         Width           =   3735
      End
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Structure"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   675
      Left            =   1320
      MaskColor       =   &H00C0E0FF&
      TabIndex        =   2
      Top             =   5880
      Width           =   2535
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Train"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   5880
      TabIndex        =   1
      Top             =   5880
      Width           =   2655
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H80000013&
      Height          =   3735
      Left            =   240
      ScaleHeight     =   3675
      ScaleWidth      =   9315
      TabIndex        =   0
      Top             =   120
      Width           =   9375
      Begin VB.Label Label4 
         BackColor       =   &H80000013&
         Caption         =   "n"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   18
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H008080FF&
         Height          =   495
         Left            =   8640
         TabIndex        =   8
         Top             =   2880
         Width           =   375
      End
      Begin VB.Label Label3 
         BackColor       =   &H80000013&
         Caption         =   "0"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H008080FF&
         Height          =   375
         Left            =   240
         TabIndex        =   7
         Top             =   3360
         Width           =   255
      End
      Begin VB.Label Label2 
         BackColor       =   &H80000013&
         Caption         =   "Error"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H008080FF&
         Height          =   495
         Left            =   720
         TabIndex        =   6
         Top             =   0
         Width           =   1335
      End
      Begin VB.Label Label1 
         BackColor       =   &H80000013&
         Caption         =   "输出误差趋势图"
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   13.5
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H008080FF&
         Height          =   375
         Left            =   3960
         TabIndex        =   5
         Top             =   120
         Width           =   3255
      End
   End
   Begin VB.Menu m1 
      Caption         =   "选择样本"
      Begin VB.Menu New 
         Caption         =   "新建"
         Begin VB.Menu m111 
            Caption         =   "训练样本"
         End
         Begin VB.Menu m112 
            Caption         =   "-"
         End
         Begin VB.Menu m122 
            Caption         =   "检验样本"
         End
      End
      Begin VB.Menu m11 
         Caption         =   "-"
      End
      Begin VB.Menu Open 
         Caption         =   "打开"
      End
      Begin VB.Menu m12 
         Caption         =   "-"
      End
      Begin VB.Menu Para 
         Caption         =   "参数设置"
      End
      Begin VB.Menu M14 
         Caption         =   "-"
      End
      Begin VB.Menu Save 
         Caption         =   "保存样本"
      End
      Begin VB.Menu m13 
         Caption         =   "-"
      End
      Begin VB.Menu Exit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu Practice 
      Caption         =   "训练"
      Begin VB.Menu Start 
         Caption         =   "开始"
      End
      Begin VB.Menu Stop 
         Caption         =   "暂停"
      End
   End
   Begin VB.Menu m3 
      Caption         =   "测试"
      Begin VB.Menu Recall 
         Caption         =   "回响"
      End
      Begin VB.Menu Common 
         Caption         =   "泛化"
      End
   End
   Begin VB.Menu m4 
      Caption         =   "帮助"
      Begin VB.Menu About 
         Caption         =   "关于…"
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub About_Click()

    Form6.Show
    
End Sub

Private Sub Command1_Click()

    Dim i As Long, j As Long, k As Long, n As Integer
    Dim numOutput As Integer
    Dim okE() As Integer       '查看哪个输出达到误差上限
    If Sample_num < 1 Then
        MsgBox "请新建或选择样本!!!", vbExclamation, "!!!"
        Exit Sub
    End If
    Picture1.Cls
    Picture1.Scale (-Prac_Num / 15, 0.1)-(Prac_Num, -0.01)
    Picture1.AutoRedraw = False
    Picture1.Line (-Prac_Num / 15, 0)-(Prac_Num, 0)
    Picture1.Line (0, 0.1)-(0, -0.01)
    For i = 1 To 10
        Picture1.CurrentY = -0.002
        Picture1.CurrentX = Prac_Num / 10 * i
        Picture1.Print Prac_Num / 10 * i
        Picture1.Line (Prac_Num / 10 * i, 0)-(Prac_Num / 10 * i, 0.002)
    Next i
    For i = 1 To 5
        Picture1.CurrentX = -Prac_Num / 15
        Picture1.CurrentY = 0.1 / 5 * i
        Picture1.Print 0.1 / 5 * i
        Picture1.Line (0, 0.1 / 5 * i)-(Prac_Num / 100, 0.1 / 5 * i)
    Next i
    InitGuiYi
    Do
        If Flag = 2 Then
            For j = 1 To Sample_num
                Get_OutPut (j)
                Get_E (j)
                Back (j)
            Next j
'            If i = 10000 Then
'                Stop
'            End If
            For j = 1 To TSample_num
                Get_OutPutT (j)
                Get_TE (j)
            Next j
            For k = 1 To LayerNodes(LayerNum)
                If E(k) < Err_Up Then
                    For j = 1 To numOutput
                        If k = okE(j) Then
                            GoTo M
                        End If
                    Next j
                    MsgBox "第" & LTrim(Str(k)) & "个输出在第" & LTrim(Str(i)) & "次达到检验误差!", vbExclamation, "!!!"
                    numOutput = numOutput + 1
                    ReDim Preserve okE(numOutput)
                    okE(numOutput) = k
                End If
                Picture1.PSet (i, E(k) / Sample_num), vbBlue
                If TSample_num > 0 Then
                    Picture1.PSet (i, TE(k) / TSample_num), vbRed
                End If
M:
            If numOutput = LayerNodes(LayerNum) Then
                Exit Do
            End If
            Next k
            GetNewW
        ElseIf Flag = 1 Then
            For j = 1 To Sample_num
                Get_OutPut (j)
                Get_E (j)
                Back (j)
                For k = 1 To LayerNodes(LayerNum)
'                    If E(k) < Err_Up Then
'                        For n = 1 To numOutput
'                            If k = okE(n) Then
'                                GoTo L
'                            End If

⌨️ 快捷键说明

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