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

📄 form1.frm

📁 vb编的bp神经网络源程序!!很有代表性的!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4260
   ClientLeft      =   5220
   ClientTop       =   3630
   ClientWidth     =   6750
   LinkTopic       =   "Form1"
   ScaleHeight     =   4260
   ScaleWidth      =   6750
   Begin VB.CommandButton Command3 
      Caption         =   "Command3"
      Height          =   495
      Left            =   4800
      TabIndex        =   2
      Top             =   1680
      Width           =   1455
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   615
      Left            =   4680
      TabIndex        =   1
      Top             =   480
      Width           =   2175
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   495
      Left            =   4920
      TabIndex        =   0
      Top             =   2400
      Width           =   1695
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
MsgBox Rnd() * 2 - 1
End Sub

Private Sub Command2_Click()
    Dim bp As CBPNet
    Dim tes
    Set bp = New CBPNet
    For i = 1 To 2000
        bp.Train 0, 0, 0
        bp.Train 0, 1, 1
        bp.Train 1, 0, 1
        bp.Train 1, 1, 0
    Next

    Print bp.Run(0, 0)
    Print bp.Run(0, 1)
    Print bp.Run(1, 0)
    Print bp.Run(1, 1)
    
    For i = 1 To 2000
        bp.Train 0, 0, 0
        bp.Train 0, 1, 1
        bp.Train 1, 0, 1
        bp.Train 1, 1, 1
    Next

    Print bp.Run(0, 0)
    Print bp.Run(0, 1)
    Print bp.Run(1, 0)
    Print bp.Run(1, 1)
    
    For i = 1 To 2000
        bp.Train 0, 0, 0
        bp.Train 0, 1, 0
        bp.Train 1, 0, 0
        bp.Train 1, 1, 1
    Next

    Print bp.Run(0, 0)
    Print bp.Run(0, 1)
    Print bp.Run(1, 0)
    Print bp.Run(1, 1)

End Sub

Private Sub Command3_Click()
Me.Cls
End Sub

⌨️ 快捷键说明

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