Some helper functions to generate and get the images from the generator
| 83 | |
| 84 | // Some helper functions to generate and get the images from the generator |
| 85 | matrix<unsigned char> generate_image(generator_type& net, const noise_t& noise) |
| 86 | { |
| 87 | const matrix<float> output = net(noise); |
| 88 | matrix<unsigned char> image; |
| 89 | assign_image(image, 255 * output); |
| 90 | return image; |
| 91 | } |
| 92 | |
| 93 | std::vector<matrix<unsigned char>> get_generated_images(const tensor& out) |
| 94 | { |