latent = th.unsqueeze(latent, dim=0)
// generate the image for this point:
img = get_image(generator, latent, args.out_depth, 1) * 255
if not args.video_only:
cv2.imwrite(os.path.join(
args.out_dir, "{:05d}.png".format(global_frame_counter)), img)
// Make an image of unsigned 8-bit integers for OpenCV
if(args.video_name):
img_int = img.astype(np.uint8)
video_out.write(img_int)
// Increment the counter
global_frame_counter += 1