{"id":13740223,"url":"https://github.com/cloudkj/layer","last_synced_at":"2026-02-14T08:03:46.256Z","repository":{"id":101018254,"uuid":"160924633","full_name":"cloudkj/layer","owner":"cloudkj","description":"Neural network inference the Unix way","archived":false,"fork":false,"pushed_at":"2019-04-21T07:04:23.000Z","size":405,"stargazers_count":563,"open_issues_count":0,"forks_count":17,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-10-07T21:41:27.534Z","etag":null,"topics":["chicken-scheme","convolutional-neural-networks","deep-learning","lisp","machine-learning","neural-networks","scheme","unix-command"],"latest_commit_sha":null,"homepage":"","language":"Scheme","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudkj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-12-08T09:38:55.000Z","updated_at":"2025-09-08T09:13:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"932078a3-dd9b-4c86-b3d3-ac4fa774fcf0","html_url":"https://github.com/cloudkj/layer","commit_stats":{"total_commits":52,"total_committers":1,"mean_commits":52.0,"dds":0.0,"last_synced_commit":"eb9d36207a33e770591bb8c0fd639ec4f0f63466"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cloudkj/layer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudkj%2Flayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudkj%2Flayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudkj%2Flayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudkj%2Flayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudkj","download_url":"https://codeload.github.com/cloudkj/layer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudkj%2Flayer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29439821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chicken-scheme","convolutional-neural-networks","deep-learning","lisp","machine-learning","neural-networks","scheme","unix-command"],"created_at":"2024-08-03T04:00:44.679Z","updated_at":"2026-02-14T08:03:46.241Z","avatar_url":"https://github.com/cloudkj.png","language":"Scheme","funding_links":[],"categories":["Scheme","Racket","Machine Learning"],"sub_categories":["General-Purpose Machine Learning","Machine Learning"],"readme":"# layer - neural network inference from the command line\n\n`layer` is a program for doing neural network inference the Unix way. Many\nmodern neural network operations can be represented as sequential,\nunidirectional streams of data processed by pipelines of [filters](https://en.wikipedia.org/wiki/Filter_(software)).\nThe computations at each layer in these neural networks are equivalent to an\ninvocation of the `layer` program, and multiple invocations can be chained\ntogether to represent the entirety of such networks.\n\nFor example, performing inference on a neural network with two fully-connected\nlayers might look something like this:\n\n    cat input | layer full -w w.1 --input-shape=2 -f tanh | layer full -w w.2 --input-shape=3 -f sigmoid\n\n`layer` applies the Unix philosophy to neural network inference. Each type of\na neural network layer is a distinct subcommand. Simple text streams of\ndelimited numeric values serve as the interface between different layers of a\nneural network. Each invocation of `layer` does one thing: it feeds the numeric\ninput values forward through an instantiation of a neural network layer, then\nemits the resulting output numeric values.\n\n## Usage\n\nExample: a convolutional neural network for [CIFAR-10](https://en.wikipedia.org/wiki/CIFAR-10).\n\n```shell\n$ cat cifar10_x.csv \\\n    | layer convolutional -w w0.csv -b b0.csv --input-shape=32,32,3  --filter-shape=3,3 --num-filters=32 -f relu \\\n    | layer convolutional -w w1.csv -b b1.csv --input-shape=30,30,32 --filter-shape=3,3 --num-filters=32 -f relu \\\n    | layer pooling --input-shape=28,28,32 --filter-shape=2,2 --stride=2 -f max\n```\n\nExample: a multi-layer perceptron for XOR.\n\n```shell\n$ # Fully connected layer with three neurons\necho \"-2.35546875,-2.38671875,3.63671875,3.521484375,-2.255859375,-2.732421875\" \u003e layer1.weights\necho \"0.7958984375,0.291259765625,1.099609375\" \u003e layer1.biases\n\n$ # Fully connected layer with one neuron\necho \"-5.0625,-3.515625,-5.0625\" \u003e layer2.weights\necho \"1.74609375\" \u003e layer2.biases\n\n$ # Compute XOR for all possible binary inputs\necho -e \"0,0\\n0,1\\n1,0\\n1,1\" \\\n    | layer full -w layer1.weights -b layer1.biases --input-shape=2 -f tanh \\\n    | layer full -w layer2.weights -b layer2.biases --input-shape=3 -f sigmoid\n0.00129012749948779\n0.99147053740106\n0.991243357927591\n0.0111237568184365\n```\n\n## Installation\n\nRequirements: BLAS 3.6.0+\n\n1. Download a [release](https://github.com/cloudkj/layer/releases)\n2. Install BLAS 3.6.0+\n  * On Debian-based systems: `apt-get install -y libblas3`\n  * On RPM-based system: `yum install -y blas`\n  * On macOS 10.3+, BLAS is pre-installed as part of the\n    [Accelerate framework](https://developer.apple.com/documentation/accelerate/blas)\n3. Unzip the release and run `[sudo] ./install.sh`, or manually relocate the\n   binaries to the path of your choice.\n\n## About\n\n`layer` is currently implemented as a proof-of-concept and supports a limited\nnumber of neural network layer types. The types of layers are currently limited\nto feed-forward layers that can be modeled as sequential, unidirectional\npipelines.\n\nInput values, weights and biases for parameterized layers, and output values\nare all read and written in [row-major order](https://en.wikipedia.org/wiki/Row-_and_column-major_order),\nbased on the shape parameters specified for each layer.\n\n`layer` is implemented in [CHICKEN Scheme](https://www.call-cc.org/).\n\n## License\n\nCopyright © 2018-2019\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudkj%2Flayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudkj%2Flayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudkj%2Flayer/lists"}