-
-
Save mdfarragher/c4268da6d784d4b329116ee73021ae47 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
using System; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Linq; | |
using CNTKUtil; | |
namespace GanDemo | |
{ | |
/// <summary> | |
/// The application class. | |
/// </summary> | |
class Program | |
{ | |
// the number of latent dimensions to use in the generator | |
static readonly int latentDimensions = 32; | |
// the image dimensions and number of color channels | |
static readonly int imageHeight = 32; | |
static readonly int imageWidth = 32; | |
static readonly int channels = 3; | |
/// <summary> | |
/// The main program entry point. | |
/// </summary> | |
/// <param name="args"></param> | |
static void Main(string[] args) | |
{ | |
// unpack archive | |
if (!File.Exists("x_channels_first_8_5.bin")) | |
{ | |
Console.WriteLine("Unpacking archive..."); | |
ZipFile.ExtractToDirectory("frog_pictures.zip", "."); | |
} | |
// load training and test data | |
Console.WriteLine("Loading data files..."); | |
var trainingData = DataUtil.LoadBinary<float>("x_channels_first_8_5.bin", 5000, channels * imageWidth * imageHeight); | |
// 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