if accept_full or (d * (X == 0)).max() == self.height * self.width:
break
+ def task_addition(self, A, f_A, B, f_B):
+ c = torch.randperm(len(self.colors) - 1)[: 3 + 1] + 1
+ for X, f_X in [(A, f_A), (B, f_B)]:
+ N1 = torch.randint(2 ** (self.width - 1) - 1, (1,)).item()
+ N1 = torch.randint(2 ** (self.width - 1) - 1, (1,)).item()
+
# end_tasks
######################################################################
"/tmp", t.__name__, prompts[:nb], answers[:nb], nrow=nrow
)
- exit(0)
+ # exit(0)
nb = 1000
######################################################################
def renew_train_w_quizzes(self, model, p2a_only=False):
- if for_train and hasattr(model, "hard_w_quizzes"):
+ if hasattr(model, "hard_w_quizzes"):
self.logger(
f"re-using {model.hard_w_quizzes.size(0)} hard world quizzes from model {model.id}"
)