{"id":13413347,"url":"https://github.com/Fontinalis/fonet","last_synced_at":"2025-03-14T19:31:58.083Z","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,"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","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221498735,"owners_count":16833055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-07-30T20:01:38.313Z","updated_at":"2024-10-26T05:30:44.100Z","avatar_url":"https://github.com/Fontinalis.png","language":"Go","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","funding_links":[],"categories":["Machine Learning","机器学习","Relational Databases","\u003cspan id=\"机器学习-machine-learning\"\u003e机器学习 Machine Learning\u003c/span\u003e"],"sub_categories":["Advanced Console UIs","Search and Analytic Databases","SQL 查询语句构建库","检索及分析资料库","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","交流"],"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"}