@CedricLy, Hi thank you for the quick reply! I’ve just tried your way, but it still gives me the same error message 
Could there be another way to solve this issue?
Oh, by the way the output of loss is different to ls_fake, so the model for ls_fake has two outputs and the model for loss has four outputs.