tensorflow-handbook-swift

TensorFlow Handbook for Swift

APACHE-2.0 License

Stars
6

TensorFlow in Swift

This repository is the Swift Chapter for TensorFlow | A Concise Handbook of TensorFlow

MNIST Example in Book:

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 (), Google Developers Expert in Machine Learning (ML GDE), [email protected]

Copyright & License

  • Code & Docs 2018 - now Huan () <[email protected]>
  • Code released under the Apache-2.0 License
  • Docs released under Creative Commons