Created
March 11, 2020 09:48
-
-
Save Arkoniak/21e6bf5dbe52707cf90e9033435a580b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct NeuralNet | |
NetDimensions::Array | |
LossFunction::String | |
params::Dict | |
end | |
function NeuralNet(dims, loss="someloss") | |
param = Dict() | |
for l=2:length(dims) | |
param["W_$(l-1)"] = rand(dims[l], dims[l-1]) * 0.1 | |
param["b_$(l-1)"] = zeros(dims[l] , 1) | |
end | |
return NeuralNet(dims, loss, param) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment