Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tools/mec] Show values of constant tensor #14375

Open
batcheu opened this issue Nov 27, 2024 · 1 comment
Open

[tools/mec] Show values of constant tensor #14375

batcheu opened this issue Nov 27, 2024 · 1 comment

Comments

@batcheu
Copy link
Contributor

batcheu commented Nov 27, 2024

What

The constant tensors (a.k.a. pseudo_const node in model explorer) have fixed value, and it can be shown in model explorer.

@batcheu
Copy link
Contributor Author

batcheu commented Nov 27, 2024

  • Model Explorer has the option 'Maximum element count for constant tensor values' which is limit the number of data to be shown in value attribute. (default = 16)
  • Handling the option is varying depends on the adapter (e.g. TFliteFlatbuffer, ONNX...)
    • TFLite

      • Keep the original rank, and resize with size limit
        // Original tensor : shape[32,3,3,3]
        [[[ 
            [101, 27, 32], 
            [252, 22, 19], 
            [278, 1, 2] 
           ], 
           [ 
            [11, 227, 142], 
            [21, 52, 9], 
            [7, 121, 32] 
           ], 
           [ ... 
         ]]]
        
        // Shown in model explorer (w/ size limit : 16)
        [[[
            [101, 27, 32],
            [252, 22, 19], 
            [278, 1, 2]
           ], 
           [
            [11, 227, 142], 
            [21, 52, 9],
            [7, 121]
        ]]]
        
    • ONNX

      • Flatten and resize with the size limit
        // Original tensor : shape[32,3,3,3]
        [[[ 
            [101, 27, 32], 
            [252, 22, 19], 
            [278, 1, 2] 
           ], 
           [ 
            [11, 227, 142], 
            [21, 52, 9], 
            [7, 121, 32] 
           ], 
           [ ... 
        ]]]
        
        // Shown in model explorer (w/ size limit : 16)
        [ 101, 27, 32, 252, 22, 19, 278, 1, 2, 11, 227, 142, 21, 52, 9, 7, 121 ]
        

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant