def test_lazy_model_summary():
    """Test that the model summary can work with lazy layers."""
    lazy_model = LazyModel()
    summary = ModelSummary(lazy_model)

    with pytest.warns(UserWarning, match="The total number of parameters detected may be inaccurate."):
        assert summary.total_parameters == 0
        assert summary.trainable_parameters == 0
Test that the model summary can work with lazy layers.
tests/tests_pytorch/utilities/test_model_summary.py