self.train_descr = generate_descr((nb * 4) // 5)
self.test_descr = generate_descr((nb * 1) // 5)
+ # Build the tokenizer
tokens = set()
for d in [ self.train_descr, self.test_descr ]:
for s in d:
img = [ picoclvr.descr2img(d, height = self.height, width = self.width) for d in descr ]
img = torch.cat(img, 0)
- file_name = f'result_picoclvr_{n_epoch:04d}.png'
+ image_name = f'result_picoclvr_{n_epoch:04d}.png'
torchvision.utils.save_image(
img / 255.,
- file_name, nrow = nb_per_primer, pad_value = 0.8
+ image_name, nrow = nb_per_primer, pad_value = 0.8
)
- log_string(f'wrote {file_name}')
+ log_string(f'wrote {image_name}')
nb_missing = sum( [
x[2] for x in picoclvr.nb_missing_properties(