def test_empty_model_summary_shapes(max_depth):
    """Test that the summary works for models that have no submodules."""
    model = EmptyModule()
    summary = summarize(model, max_depth=max_depth)
    assert summary.in_sizes == []
    assert summary.out_sizes == []
    assert summary.param_nums == []
    assert summary.total_flops == 0
Test that the summary works for models that have no submodules.
tests/tests_pytorch/utilities/test_model_summary.py