Thanks a lot for the tutorial.
To justify that I understand correctly:
The model consists of a transfer model ( e.g. CycleGAN) and two downstream networks.
Now we divide the model into 4 submodules, let’s say G_A, G_B, M_A, M_B.
The custom function should be:
def forward(input_A, input_B):
    out_A1 = M_A(input_A)
    out_A2 = M_A(G_A(input_A))
    out_B1 = M_B(input_B)
    out_B2 = M_B(G_B(input_B))


If we use the checkpoint, shall we define 4 run_function as following?
def forward(input_A, input_B):
    out_A1 = checkpoint.checkpoint(run_function_MA1, input_A)
    out_A2 = checkpoint.checkpoint(run_function_MA2, input_A)
    out_B1 = checkpoint.checkpoint(run_function_MB1, input_B)
    out_B2 = checkpoint.checkpoint(run_function_MB2, input_B)


Thanks