Functionality of torch.nograd

What is the recommended approach to exclude parts of my loss functiin from being targeted by Zygote? I am using Lux.jl. Thanks.

ChainRulesCore.ignore_derivatives

https://juliadiff.org/ChainRulesCore.jl/stable/api.html#Ignoring-gradients