📄 frmbp.frm
字号:
ScaleHeight = 2955
ScaleWidth = 2115
TabIndex = 13
Top = 0
Width = 2175
Begin VB.TextBox Text1
Height = 270
Index = 0
Left = 0
TabIndex = 14
Text = "1"
Top = 0
Visible = 0 'False
Width = 450
End
End
End
Begin VB.PictureBox Picture5
Height = 3135
Left = 3000
ScaleHeight = 3075
ScaleWidth = 2115
TabIndex = 7
Top = 600
Width = 2175
Begin VB.HScrollBar HScroll3
Height = 255
Left = 0
TabIndex = 11
Top = 2760
Width = 1815
End
Begin VB.VScrollBar VScroll3
Height = 3015
Left = 1800
TabIndex = 10
Top = 0
Width = 255
End
Begin VB.PictureBox Picture6
Height = 3015
Left = 0
ScaleHeight = 2955
ScaleWidth = 1995
TabIndex = 8
Top = 0
Width = 2055
Begin VB.TextBox Text3
Height = 270
Index = 0
Left = 0
TabIndex = 9
Text = "1"
Top = 0
Visible = 0 'False
Width = 450
End
End
End
Begin VB.Label Label2
Caption = "输入"
BeginProperty Font
Name = "楷体_GB2312"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 3
Left = 960
TabIndex = 18
Top = 360
Width = 495
End
Begin VB.Label Label2
Caption = "理想输出"
BeginProperty Font
Name = "楷体_GB2312"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 2
Left = 3000
TabIndex = 17
Top = 360
Width = 975
End
End
Begin VB.Frame Frame1
Caption = "对比结果"
BeginProperty Font
Name = "楷体_GB2312"
Size = 11.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4095
Left = 5760
TabIndex = 1
Top = 120
Width = 1815
Begin VB.PictureBox Picture3
Height = 3135
Left = 240
ScaleHeight = 3075
ScaleWidth = 1395
TabIndex = 2
Top = 600
Width = 1455
Begin VB.VScrollBar VScroll2
Height = 3015
Left = 1080
TabIndex = 32
Top = 0
Width = 255
End
Begin VB.HScrollBar HScroll2
Height = 255
Left = 0
TabIndex = 33
Top = 2760
Width = 1095
End
Begin VB.PictureBox Picture4
Height = 3015
Left = 0
ScaleHeight = 2955
ScaleWidth = 1275
TabIndex = 3
Top = 0
Width = 1335
Begin VB.TextBox Text2
Height = 270
Index = 0
Left = 0
TabIndex = 4
Text = "1"
Top = 0
Visible = 0 'False
Width = 450
End
End
End
Begin VB.Label Label2
Caption = "实际输出"
BeginProperty Font
Name = "楷体_GB2312"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 120
TabIndex = 5
Top = 240
Width = 975
End
End
Begin VB.CommandButton Command1
Caption = "网络学习"
BeginProperty Font
Name = "楷体_GB2312"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 1200
TabIndex = 0
Top = 4920
Width = 1095
End
Begin VB.Label Label4
Caption = "阈调节系数"
BeginProperty Font
Name = "楷体_GB2312"
Size = 11.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 1
Left = 1200
TabIndex = 40
Top = 7560
Width = 1335
End
Begin VB.Label Label4
Caption = "权调节系数"
BeginProperty Font
Name = "楷体_GB2312"
Size = 11.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 0
Left = 1200
TabIndex = 38
Top = 6720
Width = 1455
End
Begin VB.Label Label4
Caption = "学习次数"
BeginProperty Font
Name = "楷体_GB2312"
Size = 11.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Index = 4
Left = 1320
TabIndex = 35
Top = 5880
Width = 1215
End
Begin VB.Line Line2
BorderWidth = 3
Index = 1
X1 = 3000
X2 = 3360
Y1 = 6240
Y2 = 6480
End
Begin VB.Line Line2
BorderWidth = 3
Index = 0
X1 = 3240
X2 = 3360
Y1 = 6120
Y2 = 6480
End
Begin VB.Line Line1
BorderWidth = 3
Index = 0
X1 = 1560
X2 = 3240
Y1 = 4680
Y2 = 6360
End
Begin VB.Menu 文件
Caption = "文件"
Begin VB.Menu 打开
Caption = "打开"
Begin VB.Menu 打开样本
Caption = "打开样本"
End
Begin VB.Menu 打开权重
Caption = "打开权重"
End
End
Begin VB.Menu 保存
Caption = "保存"
Begin VB.Menu 保存样本
Caption = "保存样本"
End
Begin VB.Menu 保存权重
Caption = "保存权重"
End
End
End
Begin VB.Menu 测试
Caption = "测试"
Begin VB.Menu 测试网络
Caption = "测试网络"
End
End
Begin VB.Menu 操作
Caption = "操作"
Begin VB.Menu 退出
Caption = "退出"
End
Begin VB.Menu 关闭
Caption = "关闭"
End
End
End
Attribute VB_Name = "FrmBP"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Memory, CmdMark As Integer
Dim OY As Double
Private Sub Command1_Click()
Dim i, j, k As Integer
N = Val(Text6.Text)
L1 = Val(Text7.Text)
L2 = Val(Text8.Text)
Call Read_z_d
For j = 1 To NN
For i = 1 To KK
Err = Err + (d(j, i) - o(j, i)) ^ 2
Next i
Next j
Line3(0).X1 = 0
If CmdMark = 0 Then
Line3(0).Y1 = Picture15.Height / 2 - Err * 500
Line3(0).Y2 = Picture15.Height / 2 - Err * 500
Else
Line3(0).Y1 = OY
Line3(0).Y2 = OY
End If
Line3(0).X2 = 0
Call Erase_e
For k = 1 To N
Call StudyMain
Call Draw_e(k)
Call Write_o
Next k
OY = Line3(N).Y2
Call Write_Weight
Call Write_Key
Memory = N
CmdMark = 1
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Memory = 0
CmdMark = 0
ReDim V(JJ, II)
ReDim W(KK, JJ)
ReDim R(JJ)
ReDim Q(KK)
ReDim z(NN, II)
ReDim y(NN, JJ)
ReDim o(NN, KK)
ReDim d(NN, KK)
ReDim Er1(KK)
ReDim Er2(JJ)
Call Pic1Redraw
Call Text1Load
Call Pic3Redraw
Call Text2Load
Call Pic5Redraw
Call text3Load
Call Pic7Redraw
Call text4Load
Call Pic9Redraw
Call text5Load
Call Pic11Redraw
Call text9Load
Call Pic13Redraw
Call Text10Load
Line4.X1 = 0
Line4.Y1 = Picture15.Height / 2
Line4.X2 = Picture15.Width
Line4.Y2 = Picture15.Height / 2
'Call Teacher
'Call Write_z_d
Call Initial
Call Write_Weight
Call Write_Key
End Sub
Private Sub Write_z_d()
Dim i, j, k As Integer
For j = 1 To NN
For i = 1 To II
Text1((j - 1) * II + i).Text = z(j, i)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -