You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mutate_forward.py 197B

3 months ago
1234567
  1. import torch
  2. def mutate_remove_dropout(model):
  3. for module in model.modules():
  4. if isinstance(module, torch.nn.Dropout):
  5. module._backup_p = module.p
  6. module.p = 0