// Sample noise
z = Variable(FloatTensor(np.random.normal(0, 1, (n_row**2, opt.latent_dim))))
// Get labels ranging from 0 to n_classes for n rows
labels = np.array([num for _ in range(n_row) for num in range(n_row)])
labels = Variable(LongTensor(labels))
code_input = Variable(FloatTensor(np.random.uniform(-1, 1, (n_row**2, opt.code_dim))))
gen_imgs = generator(z, labels, code_input)
save_image(gen_imgs.data, "images/%d.png" % batches_done, nrow=n_row, normalize=True)