MCPcopy Create free account
hub / github.com/davisking/dlib / generate_image

Function generate_image

examples/dnn_dcgan_train_ex.cpp:85–91  ·  view source on GitHub ↗

Some helper functions to generate and get the images from the generator

Source from the content-addressed store, hash-verified

83
84// Some helper functions to generate and get the images from the generator
85matrix<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
93std::vector<matrix<unsigned char>> get_generated_images(const tensor& out)
94{

Callers 1

mainFunction · 0.85

Calls 1

assign_imageFunction · 0.50

Tested by

no test coverage detected