local SLP = {}
local methods = require(script:WaitForChild("methods"))
SLP.newNetwork = function(settings)
local network = {}
setmetatable(network, methods)
return network
end
return SLP
What methods looks like:
local methods = {}
local activation_function = script.Parent.Parent.Parent:WaitForChild("ActivationFunction")
function methods:propagateFoward(new_input)
end
return methods
How the main script is using the modules:
local NNLibrary = require(script:WaitForChild("NNLibrary"))
local types = NNLibrary.getNetworkTypes("FFN")
local SingleLayerPerceptron = types.SingleLayerPerceptron
local network_setting = {3, 4, "stepFunction"}
local network = SingleLayerPerceptron.newNetwork(network_setting)
network:propagateFoward({1, 4, 6})
Error: ServerScriptService.test:9: attempt to call missing method ‘propagateFoward’ of table