Skip to content

Instantly share code, notes, and snippets.

@George3d6
Created August 14, 2018 17:29
Show Gist options
  • Save George3d6/a5c579779f73ad061ad27e8ad875e680 to your computer and use it in GitHub Desktop.
Save George3d6/a5c579779f73ad061ad27e8ad875e680 to your computer and use it in GitHub Desktop.
# Initialize weights and biases, original code: https://github.com/ekinakyurek/GAN-70-Lines-of-Julia/blob/66a60a6ea4532841ee647f08759ae9b1ace0c892/gan.jl#L25
function initmodel(hidden, input, output)
𝗪 = [];
x = input
for h in [hidden... output]
push!(𝗪, atype(xavier(h,x)), atype(zeros(h, 1))) #FC Layers weights and bias
x = h
end
𝗪
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment