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

Use GGUF for test images, plot the digit #35

Merged
merged 28 commits into from
Mar 14, 2024
Merged

Use GGUF for test images, plot the digit #35

merged 28 commits into from
Mar 14, 2024

Conversation

certik
Copy link
Owner

@certik certik commented Mar 13, 2024

This prints:

$ ./mlc_clib 
╔════════════════════════════════════════════════════════╗
║                                                        ║
║                                                        ║
║                                                        ║
║                                                        ║
║                              ▓▓██░░                    ║
║                            ▓▓████▓▓                    ║
║                          ▒▒████████░░                  ║
║                        ░░▓▓██████▓▓                    ║
║                      ░░▓▓████████▓▓                    ║
║                    ▒▒████████████▓▓                    ║
║                  ▓▓██████▓▓▒▒████▓▓                    ║
║                  ░░▓▓██▒▒    ████▓▓                    ║
║                            ░░████▓▓                    ║
║                            ▒▒████▓▓                    ║
║                            ▒▒████▓▓                    ║
║                            ▒▒████▒▒                    ║
║                            ░░████▓▓                    ║
║                              ▓▓██▒▒                    ║
║                              ▓▓██▒▒                    ║
║                              ▓▓██▓▓                    ║
║                      ░░▒▒▒▒▓▓▓▓████▓▓▓▓▒▒              ║
║                  ▒▒██████████████████████              ║
║                ░░██████████▓▓▓▓▓▓▒▒░░░░░░              ║
║                  ▒▒▓▓██▒▒░░                            ║
║                                                        ║
║                                                        ║
║                                                        ║
║                                                        ║
╚════════════════════════════════════════════════════════╝
Reference value: 1
File read successfuly.
Magic:'GGUF'
Version: 3
Number of kv pairs: 1
    0: general.architecture = mnist-cnn
Data Offset: 384
Data Size:   139328
Number of arrays: 6
    0: kernel1 ndim=4 shape=(32,1,3,3) type=f32 offset=0
        First few elements of f32 array:
            [0.012498, 0.236127, 0.164662, -0.447290, 0.083497]
    1: bias1 ndim=1 shape=(32,1,1,1) type=f32 offset=1152
        First few elements of f32 array:
            [-0.024168, -0.093263, -0.071657, -0.006928, -0.117522]
    2: kernel2 ndim=4 shape=(64,32,3,3) type=f32 offset=1280
        First few elements of f32 array:
            [-0.007851, 0.047512, 0.065296, 0.166333, 0.058508]
    3: bias2 ndim=1 shape=(64,1,1,1) type=f32 offset=75008
        First few elements of f32 array:
            [-0.160946, -0.026795, -0.018063, -0.007509, -0.023383]
    4: dense_w ndim=2 shape=(10,1600,1,1) type=f32 offset=75264
        First few elements of f32 array:
            [-0.082233, -0.226420, 0.146930, 0.044679, 0.094696]
    5: dense_b ndim=1 shape=(10,1,1,1) type=f32 offset=139264
        First few elements of f32 array:
            [0.039664, 0.171566, -0.020886, -0.041569, -0.076827]

@rebcabin
Copy link
Collaborator

I can't quite run it yet

#36

@certik
Copy link
Owner Author

certik commented Mar 14, 2024

This now prints:

$ ./mlc_clib 
╔════════════════════════════════════════════════════════╗
║                                                        ║
║                                                        ║
║                                                        ║
║                                                        ║
║                                                        ║
║                                                        ║
║                                                        ║
║                  ░░▓▓░░                                ║
║                  ▓▓▓▓▓▓░░          ░░                  ║
║                  ▓▓▓▓▓▓▓▓▓▓░░░░▒▒▓▓██                  ║
║                ▓▓▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓██                  ║
║                ██▓▓▓▓▓▓▓▓██▓▓▓▓▓▓▓▓██                  ║
║              ▒▒██▓▓      ░░░░  ▒▒██▓▓                  ║
║            ░░▓▓██░░            ▓▓▓▓░░                  ║
║              ▓▓▒▒            ░░▓▓▓▓░░                  ║
║                              ░░▓▓▓▓                    ║
║                              ░░▓▓▓▓                    ║
║                              ▒▒██▒▒                    ║
║                              ▓▓▓▓░░                    ║
║                              ▓▓▓▓                      ║
║                            ░░▓▓▒▒                      ║
║                            ▒▒▓▓▒▒                      ║
║                            ▓▓██▒▒                      ║
║                          ░░▓▓▓▓░░                      ║
║                          ▒▒▓▓▓▓                        ║
║                          ▓▓▓▓▒▒                        ║
║                          ▒▒▒▒                          ║
║                                                        ║
╚════════════════════════════════════════════════════════╝
Reference value: 7; digit index 4214
Digit probabilities:
0.000000 0.000000 0.000000 0.000000 0.000003 0.000000 0.000000 0.999994 0.000000 0.000003 
Inferred value: 7

@certik
Copy link
Owner Author

certik commented Mar 14, 2024

I am going to merge it, because it works.

@certik certik merged commit 1e255c7 into main Mar 14, 2024
1 check passed
@certik certik deleted the mnist9 branch March 14, 2024 05:02
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

Successfully merging this pull request may close these issues.

2 participants