{"id":15971684,"url":"https://github.com/vkuznet/swiftmlexample","last_synced_at":"2025-04-04T15:44:58.797Z","repository":{"id":136818492,"uuid":"290567618","full_name":"vkuznet/SwiftMLExample","owner":"vkuznet","description":null,"archived":false,"fork":false,"pushed_at":"2020-08-31T19:38:39.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T01:41:26.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/vkuznet.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-26T17:56:47.000Z","updated_at":"2020-08-31T19:38:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"43c7fe7c-2bf8-4442-b53a-cb2e0ab34731","html_url":"https://github.com/vkuznet/SwiftMLExample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vkuznet%2FSwiftMLExample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vkuznet%2FSwiftMLExample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vkuznet%2FSwiftMLExample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vkuznet%2FSwiftMLExample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vkuznet","download_url":"https://codeload.github.com/vkuznet/SwiftMLExample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208066,"owners_count":20901568,"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":[],"created_at":"2024-10-07T20:40:20.257Z","updated_at":"2025-04-04T15:44:58.773Z","avatar_url":"https://github.com/vkuznet.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"## SwiftMLExample\nRepository with end-to-end ML example based on\n[TF Swift tutorial](https://www.tensorflow.org/swift/tutorials/model_training_walkthrough).\nWe extend the tutorial to provide example how to wrap up everything\ninto single package, organize codebase into separate modules,\nadd external arguments, etc.\n\n### Build notes\nSwift provides [package manager](https://swift.org/getting-started/#using-the-package-manager)\nwhich helps to setup initial project area. To do that just create a new\ndirectory and run within it the following command:\n```\n# initalize the new package (it is already done here)\nswift package init --type executable\n```\nThis will initialize the project and create Package.swift file which\nyou can later customize to include your set of dependencies, etc.\nThis is already done for this package.\n\nTo maintain the codebase you need to use the following commands (within\nthis project area):\n```\n# build/compile our codebase (the entire build will be located in .build area)\nswift build\n\n# run our executable\nswift run swift-ml --help\n\n# run our training for 300 epochs using 64 batch size and save model to model.tf file\nswift run swift-ml train -e 300 --batch-size 64 --model-filename model.tf\n\n# run test ML action, i.e. load the model and make predictions\nswift run swift-ml test --model-filename model.tf\n\n# run MNIST training\nswift run swift-ml mnist\n\n# clean-up our build\nswift package clean\n\n# create full release\nswift build --configuration release\n\n# grab new executable from release area and put it into provide path\ncp .build/release/swift-ml /path\n```\n\nFurther customization can be done using swift\n[Mint](https://github.com/yonaskolb/Mint) package.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvkuznet%2Fswiftmlexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvkuznet%2Fswiftmlexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvkuznet%2Fswiftmlexample/lists"}