Skip to content
Tensorflow Handbook for Swift
Jupyter Notebook Swift Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
Sources/s4tf
Tests
docs
.gitignore
.travis.yml
LICENSE
Makefile
Package.swift
README.md
tensorflow-handbook-swift-example.ipynb

README.md

Tensorflow in Swift

Build Status

Swift for Tensorflow

This repository is the Swift Chapter for 简单粗暴TensorFlow | A Concise Handbook of TensorFlow

MNIST Example in Book: Open In Colab

Book Chapter: Tensorflow Handbook - Swift

USAGE

For those who had Swift installed

If you had installed Swift locally, then you can run swift directly:

$ swift run
Downloading train-images-idx3-ubyte ...
Downloading train-labels-idx1-ubyte ...
Reading data.
Constructing data tensors.
Test Accuracy: 0.9116667

For those who had no Swift installed (Docker)

If you are using Windows, or Ubuntu 19 (Swift for Tensorflow only supports Mac & Ubuntu 18.04 at Aug 2019), then the only way which you can play with this repository is to use Docker.

# use `nvidia-docker` if you want to use GPU
docker run -ti --rm \
  --privileged \
  --userns=host \
  -v "$(pwd)":/notebooks \
  zixia/swift \
  swift run

See:

  1. Docker parameters - https://github.com/hashicorp/nomad/issues/1904#issuecomment-523295864
  2. Docker Repo of zixia/swift - https://github.com/huan/docker-swift-tensorflow

TODO

RESOURCES

Videos

Author

Huan (李卓桓) <zixia@zixia.net>

profile for zixia at Stack Overflow, Q&A for professional and enthusiast programmers

Copyright & License

  • Code & Docs © 2018 - now Huan (李卓桓) <zixia@zixia.net>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons
You can’t perform that action at this time.