May 2018
Intermediate to advanced
404 pages
9h 37m
English
In runMNISTModel, we call the helper method LoadModel to load the GAN model and then set the input tensor to be 6 batches of 100 random numbers with normal distribution (mean 0.0 and std 1.0). The random input with normal distribution is what the model expects. You can change 6 to any other number and get back that number of generated digits:
- (NSArray*) runMNISTModel { tensorflow::Status load_status; load_status = LoadModel(@"gan_mnist", @"pb", &tf_session); if (!load_status.ok()) return NULL; std::string input_layer = "z_placeholder"; std::string output_layer = "Sigmoid_1"; tensorflow::Tensor input_tensor(tensorflow::DT_FLOAT, tensorflow::TensorShape({6, 100})); auto input_map = input_tensor.tensor<float, 2>(); ...Read now
Unlock full access