In the runPix2PixBlurryModel method, we use the LoadMemoryMappedModel method to load the pix2pix_transformed_memmapped.pb model file, and load the test image and set the input tensor in a similar way to what we did in Chapter 4, Transforming Pictures with Amazing Art Styles:
- (NSArray*) runPix2PixBlurryModel { tensorflow::Status load_status; load_status = LoadMemoryMappedModel(@"pix2pix_transformed_memmapped", @"pb", &tf_session, &tf_memmapped_env); if (!load_status.ok()) return NULL; std::string input_layer = "image_feed"; std::string output_layer = "generator_1/deprocess/truediv"; NSString* image_path = FilePathForResourceName(@"ww", @"png"); int image_width; int image_height; int image_channels; std::vector<tensorflow::uint8> ...