RoseTTAFold-All-Atom/rf2aa/training/checkpoint.py
2024-03-04 22:38:17 -08:00

5 lines
174 B
Python

# for gradient checkpointing
def create_custom_forward(module, **kwargs):
def custom_forward(*inputs):
return module(*inputs, **kwargs)
return custom_forward