Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Conversation

rahul-tuli
Copy link
Member

This PR updates the summary printed by sparsezoo.analyze into a more human readable form:

sparsezoo.analyze "zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned95-none"

Output:

INFO:root:Downloading files from SparseZoo: 'zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned95-none'
INFO:root:Starting Analysis ...
INFO:root:Analysis complete, collating results...
{   'Parameters': {   'Weight': {   'Total': 25502912,
                                    'Percent Total %': 100.0,
                                    'Sparsity %': 95.0,
                                    'FP32 Precision %': 100.0,
                                    'INT8 Precision %': 0.0},
                      'Bias': {   'Total': 1000,
                                  'Percent Total %': 0.0,
                                  'Sparsity %': 0.0,
                                  'FP32 Precision %': 100.0,
                                  'INT8 Precision %': 0.0},
                      'Total': {   'Total': 25503912,
                                   'Percent Total %': 100.0,
                                   'Sparsity %': 95.0,
                                   'FP32 Precision %': 100.0,
                                   'INT8 Precision %': 0.0}},
    'Parameterized Ops': {   'Conv': {   'Total': 23454912,
                                         'Percent Total %': 91.97,
                                         'Sparsity %': 95.66,
                                         'FP32 Precision %': 100.0,
                                         'INT8 Precision %': 0.0},
                             'Gemm': {   'Total': 2049000,
                                         'Percent Total %': 8.03,
                                         'Sparsity %': 87.42,
                                         'FP32 Precision %': 100.0,
                                         'INT8 Precision %': 0.0},
                             'Total': {   'Total': 25503912,
                                          'Percent Total %': 100.0,
                                          'Sparsity %': 95.0,
                                          'FP32 Precision %': 100.0,
                                          'INT8 Precision %': 0.0}},
    'Non Parameterized Ops': {   'Shape': {   'Total': 1,
                                              'Percent Total %': 0.79,
                                              'Sparsity %': 0.0,
                                              'FP32 Precision %': 100.0,
                                              'INT8 Precision %': 0.0},
                                 'GlobalAveragePool': {   'Total': 1,
                                                          'Percent Total %': 0.79,
                                                          'Sparsity %': 0.0,
                                                          'FP32 Precision %': 100.0,
                                                          'INT8 Precision %': 0.0},
                                 'Relu': {   'Total': 49,
                                             'Percent Total %': 38.58,
                                             'Sparsity %': 0.0,
                                             'FP32 Precision %': 100.0,
                                             'INT8 Precision %': 0.0},
                                 'Gather': {   'Total': 1,
                                               'Percent Total %': 0.79,
                                               'Sparsity %': 0.0,
                                               'FP32 Precision %': 100.0,
                                               'INT8 Precision %': 0.0},
                                 'Reshape': {   'Total': 1,
                                                'Percent Total %': 0.79,
                                                'Sparsity %': 0.0,
                                                'FP32 Precision %': 100.0,
                                                'INT8 Precision %': 0.0},
                                 'Add': {   'Total': 16,
                                            'Percent Total %': 12.6,
                                            'Sparsity %': 0.0,
                                            'FP32 Precision %': 100.0,
                                            'INT8 Precision %': 0.0},
                                 'BatchNormalization': {   'Total': 53,
                                                           'Percent Total %': 41.73,
                                                           'Sparsity %': 0.0,
                                                           'FP32 Precision %': 100.0,
                                                           'INT8 Precision %': 0.0},
                                 'Unsqueeze': {   'Total': 1,
                                                  'Percent Total %': 0.79,
                                                  'Sparsity %': 0.0,
                                                  'FP32 Precision %': 100.0,
                                                  'INT8 Precision %': 0.0},
                                 'MaxPool': {   'Total': 1,
                                                'Percent Total %': 0.79,
                                                'Sparsity %': 0.0,
                                                'FP32 Precision %': 100.0,
                                                'INT8 Precision %': 0.0},
                                 'Concat': {   'Total': 1,
                                               'Percent Total %': 0.79,
                                               'Sparsity %': 0.0,
                                               'FP32 Precision %': 100.0,
                                               'INT8 Precision %': 0.0},
                                 'Softmax': {   'Total': 1,
                                                'Percent Total %': 0.79,
                                                'Sparsity %': 0.0,
                                                'FP32 Precision %': 100.0,
                                                'INT8 Precision %': 0.0},
                                 'Constant': {   'Total': 1,
                                                 'Percent Total %': 0.79,
                                                 'Sparsity %': 0.0,
                                                 'FP32 Precision %': 100.0,
                                                 'INT8 Precision %': 0.0},
                                 'Total': {   'Total': 127,
                                              'Percent Total %': 100.0,
                                              'Sparsity %': 0.0,
                                              'FP32 Precision %': 100.0,
                                              'INT8 Precision %': 0.0}},
    'Summary': {   'Number of Parameters': 25503912,
                   'Number of Operations': 25504039,
                   'Weight Sparsity %': 95.0,
                   'Quantized Parameterized Ops %': 0.0,
                   'Quantized Non-Parameterized Ops %': 0.0},
    'Model': 'zoo:cv/classification/resnet_v1-50/pytorch/sparseml/imagenet/pruned95-none'}

@rahul-tuli rahul-tuli changed the base branch from main to sparsezoo.analyze February 17, 2023 00:54
@rahul-tuli rahul-tuli force-pushed the sparsezoo.analyze-update-summary branch from 2db58d3 to 4fa1d50 Compare February 17, 2023 00:57
@rahul-tuli rahul-tuli merged commit 4fa1d50 into sparsezoo.analyze Feb 17, 2023
@rahul-tuli rahul-tuli deleted the sparsezoo.analyze-update-summary branch February 17, 2023 00:58
@rahul-tuli rahul-tuli mentioned this pull request Feb 17, 2023
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant