Last active
April 27, 2023 15:53
-
-
Save steveAllen0112/8a80be126ff25a6818d205db6959b362 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⍝ Helper functions for the problem | |
⍝ here: https://open.kattis.com/problems/mnist10class | |
⍝ NB: This set of functions does NOT solve the problem. | |
⍝ For that, you need a training function, and real inputs | |
⍝ that you can check the results against. | |
⍝ Generate a random weightset | |
weightset ← {×0.5-2|?10 15 51⍴2} | |
⍝ Generate some random inputs | |
inputs ← {×0.5-2|?⍵ 51⍴2} | |
⍝ The network itself | |
guess ← { ⊣/ ⍒⍤1⍉ +⌿ ÷∘|⍨ +⌿ ⍺ ∘.×⍤2 1⍥⍉ ⍵⍴⍨1⌈¯2↑⍴⍵ } | |
⍝ Usage | |
(weightset⍬) guess inputs ?10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment