【发布时间】:2021-02-18 19:06:10
【问题描述】:
目前我正在 AHK 研究 AI。
现在我有一个问题,我不知道如何处理矩阵。请参见下面的示例矩阵:
WeightLooper := 1
Loop %NumberOfWeightsLayerTotal%
{
Random, Weight_%WeightLooper%, -1.0, 1.0
WeightLooper := WeightLooper + 1
}
WEIGHTS_1 := Array([Weight_1, Weight_2, Weight_3, Weight_4], [Weight_5, Weight_6, Weight_7, Weight_8], [Weight_9, Weight_10, Weight_11, Weight_12])
TRAINING_INPUTS := []
rows := (LastFilledY - 1)
columns := (LastFilledX - 1)
Xas := 0
Yas := 0
Loop, % rows
{
Xas := 0
Yas := Yas + 1
row := []
Loop, % columns
{
Xas := Xas + 1
row.push(myarray[Yas][Xas])
}
TRAINING_INPUTS.push(row)
}
现在我有一个 3x4 的矩阵。假设我想要一个 10x10 的矩阵,我该怎么做?所以基本上我想创建一个变量矩阵。
我问这个是因为我的输入(csv 文件)可以在 2x2 到 1000000x1000000 之间变化。
【问题讨论】:
标签: autohotkey