Yup. The function is something like for now
def is_pytorch_model(obj):
    return isinstance(obj, torch.nn.Module)

It, clearly, consider losses and other torch.nn.Module subclasses as NN models which is not true.