{"id":37098872,"url":"https://github.com/fontinalis/fonet","last_synced_at":"2026-01-14T12:01:27.382Z","repository":{"id":50230168,"uuid":"105671742","full_name":"Fontinalis/fonet","owner":"Fontinalis","description":"fonet is a deep neural network package for Go.","archived":false,"fork":false,"pushed_at":"2021-06-01T10:04:04.000Z","size":30,"stargazers_count":82,"open_issues_count":2,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-07-31T20:52:15.402Z","etag":null,"topics":["deep-neural-networks","golang","machine-learning"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/Fontinalis.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}},"created_at":"2017-10-03T15:57:15.000Z","updated_at":"2024-06-05T02:21:03.000Z","dependencies_parsed_at":"2022-08-17T16:00:57.148Z","dependency_job_id":null,"html_url":"https://github.com/Fontinalis/fonet","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Fontinalis/fonet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fontinalis%2Ffonet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fontinalis%2Ffonet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fontinalis%2Ffonet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fontinalis%2Ffonet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fontinalis","download_url":"https://codeload.github.com/Fontinalis/fonet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fontinalis%2Ffonet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28419272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["deep-neural-networks","golang","machine-learning"],"created_at":"2026-01-14T12:01:26.819Z","updated_at":"2026-01-14T12:01:27.377Z","avatar_url":"https://github.com/Fontinalis.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fonet\n\n[![Go](https://github.com/Fontinalis/fonet/actions/workflows/go.yml/badge.svg?branch=master)](https://github.com/Fontinalis/fonet/actions/workflows/go.yml)\n[![Coverage Status](https://coveralls.io/repos/github/Fontinalis/fonet/badge.svg?branch=master)](https://coveralls.io/github/Fontinalis/fonet?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Fontinalis/fonet)](https://goreportcard.com/report/github.com/Fontinalis/fonet)\n[![Go Reference](https://pkg.go.dev/badge/github.com/Fontinalis/fonet.svg)](https://pkg.go.dev/github.com/Fontinalis/fonet)\n\n`fonet` is a deep neural network package for Go. It's mainly created because I wanted to learn about neural networks and create my own package. I'm planning to continue the development of the package and add more function to it, for example exporting/importing a model.\n\n## Install\n\nIt's the same as everywhere, you just have to run the\n```\ngo get github.com/Fontinalis/fonet\n```\n\n## Usage\n\nI focused (and still focusing) on creating an easy to use package, but let me know if something is not clear.\n\n### Creating a network\nAs in the `xor` example, it's not so complicated to create a network.\nWhen you creating the network, you always have to define the layers.\n```go\nn := fonet.NewNetwork([]int{2, 3, 1}, fonet.Sigmond)\n/*\n2 nodes in the INPUT LAYER\n3 nodes in the HIDDEN LAYER\n1 node in the OUTPUT LAYER\n*/\n```\nBut my goal was also to create a package, which can create deep neural networks too, so here is another example for that.\n```go\nn := fonet.NewNetwork([]int{6, 12, 8, 4}, fonet.Sigmond)\n/*\n6 nodes in the INPUT LAYER\n12 nodes in the HIDDEN LAYER (1)\n8 nodes in the HIDDEN LAYER (2)\n4 nodes in the OUTPUT LAYER\n*/\n```\n\n\n### Train the network\nAfter creating the network, you have to train your network. To do that, you have to specify your training set, which should be like the next\n```go\nvar trainingData = [][][]float64{\n    [][]float64{ // The actual training sample\n        []float64{\n            /*\n            The INPUT data\n            */\n        },\n        []float64{\n            /*\n            The OUTPUT data\n            */\n        },\n    },\n}\n```\nAfter giving the training data, you can set the epoch and the learning rate.\n```go\nn.Train(trainingData, epoch, lrate, true)\n// Train(trainingData [][][]float64, epochs int, lrate float64, debug bool)\n```\n`\nNote: When 'debug' is true, it'll show when and which epoch is finished\n`\n### Predict the output\nAfter training your network, using the `Predict(..)` function you can calculate the output for the given input. \n\nIn the case of XOR, it looks like the next\n```go\ninput := []float64{\n    1,\n    1,\n}\nout := n.Predict(input)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffontinalis%2Ffonet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffontinalis%2Ffonet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffontinalis%2Ffonet/lists"}