The error message wants to tell you it doesn’t have anything w.r.t. which you would want to compute grads.
One might naïvely think freeze_all_layers could cause training to bite on ice here.
Best regards
Thomas