-
-
Save mdfarragher/d60e821dbca50f3747f460cba17ad369 to your computer and use it in GitHub Desktop.
This file contains 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
// create the generator | |
var generator = generatorVar | |
.Dense(128 * 16 * 16, v => CNTK.CNTKLib.LeakyReLU(v, 0.1)) | |
.Reshape(new int[] { 16, 16, 128 }) | |
.Convolution2D(256, new int[] { 5, 5 }, padding: true, activation: v => CNTK.CNTKLib.LeakyReLU(v, 0.1)) | |
.ConvolutionTranspose( | |
filterShape: new int[] { 4, 4 }, | |
numberOfFilters: 256, | |
strides: new int[] { 2, 2 }, | |
outputShape: new int[] { 32, 32 }, | |
padding: true, | |
activation: v => CNTK.CNTKLib.LeakyReLU(v, 0.1) | |
) | |
.Convolution2D(256, new int[] { 5, 5 }, padding: true, activation: v => CNTK.CNTKLib.LeakyReLU(v, 0.1)) | |
.Convolution2D(256, new int[] { 5, 5 }, padding: true, activation: v => CNTK.CNTKLib.LeakyReLU(v, 0.1)) | |
.Convolution2D(channels, new int[] { 7, 7 }, padding: true, activation: CNTK.CNTKLib.Tanh) | |
.ToNetwork(); | |
// the rest of the code goes here... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment