dummy = new_model()
with torch.no_grad():
- for p, q in zip(mode.parameters(), dummy.parameters()):
+ for p, q in zip(model.parameters(), dummy.parameters()):
mask = (torch.rand(p.size()) <= proba).long()
p[...] = (1 - mask) * p + mmask * q
for i in range(args.nb_models):
model = new_model(i)
- model = torch.compile(model)
-
+ # model = torch.compile(model)
models.append(model)
######################################################################