return s
+######################################################################
+
def generate(nb, height = 6, width = 8,
max_nb_squares = 5, max_nb_statements = 10,
many_colors = False):
if __name__ == '__main__':
descr = generate(nb = 5)
- for d in descr:
- print(d)
- print()
- img = descr2img(descr)
- print(img.size())
+ with open('picoclvr_example.txt', 'w') as f:
+ for d in descr:
+ f.write(f'{d}\n\n')
+ img = descr2img(descr)
torchvision.utils.save_image(img / 255.,
'picoclvr_example.png', nrow = 16, pad_value = 0.8)