result = input.clone()
ar_mask = result.new_zeros(result.size())
ar_mask[:, self.height * self.width :] = 1
+ result *= 1-ar_mask
masked_inplace_autoregression(model, self.batch_size, result, ar_mask)
mazes, paths = self.seq2map(result)
nb_correct += maze.path_correctness(mazes, paths).long().sum()
input = self.test_input[:32]
result = input.clone()
ar_mask = result.new_zeros(result.size())
-
ar_mask[:, self.height * self.width :] = 1
+ result *= 1-ar_mask
masked_inplace_autoregression(model, self.batch_size, result, ar_mask)
mazes, paths = self.seq2map(input)