Skip to content

Instantly share code, notes, and snippets.

@George3d6
Created August 14, 2018 17:32
Show Gist options
  • Save George3d6/c8d4468727d258103f2b2b43087087f7 to your computer and use it in GitHub Desktop.
Save George3d6/c8d4468727d258103f2b2b43087087f7 to your computer and use it in GitHub Desktop.
𝒩(input, batch) = atype(randn(Float32, input, batch)) # SampleNoise
function generate_and_save(π—ͺ,number,πž—,gen;fldr="save_image_directory/")
Gz = G(π—ͺ[1],𝒩(πž—[:ginp],number)) #.> 0.5
Gz = permutedims(reshape(Gz,(πž—[:size],πž—[:size],number)),(2,1,3))
[png(heatmap(Gz[:,:,i]), "$(fldr)$(gen)-$(i).png") for i=1:number]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment