{"id":20520243,"url":"https://github.com/plasmacontrol/keras2c","last_synced_at":"2026-02-13T18:02:52.906Z","repository":{"id":44546188,"uuid":"193152058","full_name":"PlasmaControl/keras2c","owner":"PlasmaControl","description":"A simple library to deploy Keras neural networks in pure C for realtime applications","archived":false,"fork":false,"pushed_at":"2025-12-28T03:40:07.000Z","size":7813,"stargazers_count":91,"open_issues_count":4,"forks_count":43,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-12-29T06:34:13.640Z","etag":null,"topics":["c","control-systems","convert-keras","convert-tensorflow","cpp","keras","keras-to-c","machine-learning","neural-network","real-time","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PlasmaControl.png","metadata":{"files":{"readme":"README.rst","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-06-21T19:45:05.000Z","updated_at":"2025-12-27T14:30:56.000Z","dependencies_parsed_at":"2025-12-19T03:03:12.150Z","dependency_job_id":null,"html_url":"https://github.com/PlasmaControl/keras2c","commit_stats":null,"previous_names":["plasmacontrol/keras2c","f0uriest/keras2c"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/PlasmaControl/keras2c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2Fkeras2c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2Fkeras2c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2Fkeras2c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2Fkeras2c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PlasmaControl","download_url":"https://codeload.github.com/PlasmaControl/keras2c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PlasmaControl%2Fkeras2c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["c","control-systems","convert-keras","convert-tensorflow","cpp","keras","keras-to-c","machine-learning","neural-network","real-time","tensorflow"],"created_at":"2024-11-15T22:18:46.621Z","updated_at":"2026-02-13T18:02:52.856Z","avatar_url":"https://github.com/PlasmaControl.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"#######\nkeras2c\n#######\n\n|Python-Publish| |Python-Versions| |Codecov| \n\n|License| |DOI|\n\nkeras2c is a library for deploying keras neural networks in C99, using only standard libraries. It is designed to be as simple as possible for real-time applications.\n\nPlease cite `this paper \u003chttps://doi.org/10.1016/j.engappai.2021.104182\u003e`_ if you use this work in your research:\n\n.. code-block:: bibtex\n\n    R. Conlin, K. Erickson, J. Abbate, and E. Kolemen, “Keras2c: A library for converting Keras neural networks to real-time compatible C,” \n    Engineering Applications of Artificial Intelligence, vol. 100, p. 104182, Apr. 2021, doi: 10.1016/j.engappai.2021.104182.\n\nInstallation\n************\n\n**Recommended Installation**\n\nThe modern way to install keras2c is via pip:\n\n.. code-block:: bash\n\n   pip install keras2c\n\nTo use the original/stable version, use the Release v1.0.2 (https://github.com/PlasmaControl/keras2c/releases/tag/v1.0.2) with the command:\n\n.. code-block:: bash\n\n    git clone git@github.com:PlasmaControl/keras2c.git --branch v1.0.2\n\nFor Windows, make sure that you have **gcc** installed. We recommend **CYGWIN** with make and gcc.\n\nQuickstart\n**********\n\nkeras2c can be used from the command line:\n\n.. code-block:: bash\n\n    python -m keras2c [-h] [-m] [-t] model_path function_name\n\n    A library for converting the forward pass (inference) part of a keras model to\n        a C function\n\n    positional arguments:\n      model_path         File path to saved keras .h5 model file\n      function_name      What to name the resulting C function\n      \n    optional arguments:\n      -h, --help         show this help message and exit\n      -m, --malloc       Use dynamic memory for large arrays. Weights will be\n                         saved to .csv files that will be loaded at runtime\n      -t , --num_tests   Number of tests to generate. Default is 10\n\n\nIt can also be used within a python environment:\n\n.. code-block:: python\n\n    from keras2c import k2c\n    k2c(model, function_name, malloc=False, num_tests=10, verbose=True)\n\nFor more information, see `Installation \u003chttps://f0uriest.github.io/keras2c/installation.html\u003e`_ and `Usage \u003chttps://f0uriest.github.io/keras2c/usage.html\u003e`_\n\n\nSupported Layers\n****************\n- **Core Layers**: Dense, Activation, Dropout, Flatten, Input, Reshape, Permute, RepeatVector, ActivityRegularization, SpatialDropout1D, SpatialDropout2D, SpatialDropout3D\n- **Convolution Layers**: Conv1D, Conv2D, Conv3D, Cropping1D, Cropping2D, Cropping3D, UpSampling1D, UpSampling2D, UpSampling3D, ZeroPadding1D, ZeroPadding2D, ZeroPadding3D\n- **Pooling Layers**: MaxPooling1D, MaxPooling2D, AveragePooling1D, AveragePooling2D, GlobalMaxPooling1D, GlobalAveragePooling1D, GlobalMaxPooling2D, GlobalAveragePooling2D, GlobalMaxPooling3D, GlobalAveragePooling3D\n- **Recurrent Layers**: SimpleRNN, GRU, LSTM, SimpleRNNCell, GRUCell, LSTMCell\n- **Embedding Layers**: Embedding\n- **Merge Layers**: Add, Subtract, Multiply, Average, Maximum, Minimum, Concatenate, Dot\n- **Advanced Activation Layers**: LeakyReLU, PReLU, ELU, Softmax, ReLU\n- **Normalization Layers**: BatchNormalization\n- **Noise Layers**: GaussianNoise, GaussianDropout, AlphaDropout\n- **Layer Wrappers**: TimeDistributed, Bidirectional\n  \nToDo\n****\n- **Core Layers**: Lambda, Masking\n- **Convolution Layers**: SeparableConv1D, SeparableConv2D, DepthwiseConv2D, Conv2DTranspose, Conv3DTranspose\n- **Pooling Layers**: MaxPooling3D, AveragePooling3D\n- **Locally Connected Layers**: LocallyConnected1D, LocallyConnected2D\n- **Recurrent Layers**: ConvLSTM2D, ConvLSTM2DCell\n- **Merge Layers**: Broadcasting merge between different sizes\n- **Misc**: models made from submodels\n\nContribute\n**********\n\n- Documentation: `\u003chttps://f0uriest.github.io/keras2c/\u003e`_\n- Issue Tracker: `\u003chttps://github.com/f0uriest/keras2c/issues\u003e`_\n- Source Code: `\u003chttps://github.com/f0uriest/keras2c/\u003e`_\n  \nLicense\n*******\n\nThe project is licensed under the LGPLv3 license.\n\n.. |Codecov| image:: https://codecov.io/gh/f0uriest/keras2c/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/f0uriest/keras2c\n    :alt: Code Coverage\n.. |Python-Publish| image:: https://github.com/PlasmaControl/keras2c/actions/workflows/python-publish.yml/badge.svg\n    :target: https://github.com/PlasmaControl/keras2c/actions/workflows/python-publish.yml\n    :alt: Upload Python Package\n.. |Python-Versions| image:: https://img.shields.io/badge/python-3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue\n    :target: https://github.com/PlasmaControl/keras2c\n    :alt: Supported Python Versions\n.. |License| image:: https://img.shields.io/github/license/f0uriest/keras2c\n    :target: https://github.com/f0uriest/keras2c/blob/master/LICENSE\n    :alt: License: LGPLv3\n.. |DOI| image:: https://zenodo.org/badge/193152058.svg\n    :target: https://zenodo.org/badge/latestdoi/193152058\n    :alt: Please Cite Keras2c!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasmacontrol%2Fkeras2c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplasmacontrol%2Fkeras2c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplasmacontrol%2Fkeras2c/lists"}