If you guys have some experience from Pytorch or other major deep learning frameworks, and have some time to spare, give my simple neural network project (maybe the first one in VBA?) a test run. Big plus if you can test it with OpenBLAS dll which you put inside the same folder as the Excel workbook and edit the dll path in BlasFunctions module -- OpenBLAS provides prebuilt binary packages here https://sourceforge.net/projects/ope...files/v0.3.27/:
https://github.com/personalityson/VBANN
Code:
Option Explicit
Const MODEL_NAME As String = "MyModel"
Private m_oModel As Sequential
Public Sub SetupAndTrain()
Dim lBatchSize As Long
Dim lNumEpochs As Long
Dim oTrainingSet As DataLoader
Dim oTestSet As DataLoader
VerifyOpenBlasLibrary
lBatchSize = 10
lNumEpochs = 50
Set oTrainingSet = DataLoader(ImportDatasetFromWorksheet("ConcreteTrain", 8, 1, True), lBatchSize)
Set oTestSet = DataLoader(ImportDatasetFromWorksheet("ConcreteTest", 8, 1, True), lBatchSize)
Set m_oModel = Sequential(L2Loss(), SGDM())
m_oModel.Add FullyConnectedLayer(8, 200)
m_oModel.Add LeakyReLULayer()
m_oModel.Add FullyConnectedLayer(200, 100)
m_oModel.Add LeakyReLULayer()
m_oModel.Add FullyConnectedLayer(100, 50)
m_oModel.Add LeakyReLULayer()
m_oModel.Add FullyConnectedLayer(50, 1)
m_oModel.Fit oTrainingSet, oTestSet, lNumEpochs
Serialize MODEL_NAME, m_oModel
Beep
End Sub
Public Sub ContinueTraining()
Dim lBatchSize As Long
Dim lNumEpochs As Long
Dim oTrainingSet As DataLoader
Dim oTestSet As DataLoader
VerifyOpenBlasLibrary
lBatchSize = 10
lNumEpochs = 50
Set oTrainingSet = DataLoader(ImportDatasetFromWorksheet("ConcreteTrain", 8, 1, True), lBatchSize)
Set oTestSet = DataLoader(ImportDatasetFromWorksheet("ConcreteTest", 8, 1, True), lBatchSize)
Set m_oModel = Unserialize(MODEL_NAME)
m_oModel.Fit oTrainingSet, oTestSet, lNumEpochs
Serialize MODEL_NAME, m_oModel
Beep
End Sub
Thanks