Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensorflow in Swift #7

Open
huan opened this issue Mar 17, 2019 · 5 comments
Open

Tensorflow in Swift #7

huan opened this issue Mar 17, 2019 · 5 comments
Assignees
Labels

Comments

@huan
Copy link
Collaborator

huan commented Mar 17, 2019

计划 Swift 部分和 JavaScript 部分,并列为 Tensorflow 的两大跨语言脚本。

原计划:本书第一版完成 JavaScript 和 Swift
新计划:将 Swift 部分,顺延到本书第二版进行修订。第一版中暂不包含 Swift 章节。

大家看这样是否可以? @snowkylin @dpinthinker

UPDATE(17, Mar) 经过和锡涵讨论,TF2.0正式发布之前还能有一些时间,所以决定原计划不变。撰写一个最基本的版本,5-10页

@huan huan self-assigned this Mar 17, 2019
huan added a commit that referenced this issue Aug 25, 2019
@huan huan mentioned this issue Aug 25, 2019
@huan
Copy link
Collaborator Author

huan commented Aug 25, 2019

Todo-list:

  • [ ] Add static shape mismatch checking example
  • Make a clean MNIST example code like Julia
  • Change all example code: replace them to the code inside the clean example

@huan
Copy link
Collaborator Author

huan commented Sep 9, 2019

Reviews from @snowkylin

Swift

  • Use code reference in RST file instead of hardcoded. (submodule for huan's repo?)
  • Code example segment explanation
  • Replace the full example code with a link to repo/web
  • Make the chapter shorter by moving minor contents into tips box
  • Swift base syntax introduction 1-2 page with the objective: a Python programmer can understand what swift is doing.
    • & Mutable explaination
    • Swift specific syntax intro
  • Swift Dataset intro
  • Add source link to each image

@snowkylin
Copy link
Owner

snowkylin commented Nov 12, 2019

  • Data API和后文的Dataset是什么,只要import tensorflow就可以使用吗,对应于tf.data?
  • 使用 Docker 执行 Swift 本地代码文件如果不复杂的话就直接写出方法吧,我瞄了一眼 https://github.com/huan/docker-swift-tensorflow 好像没看到怎样做
  • •这个符号要怎么用键盘打出来?
  • 在restructedtext中双反引号是inline标记,单反引号是斜体,劳烦autobuild一下再检查一下格式,JS部分我大部分改过来了
  • public func callAsFunction(_ input: Input)的下划线是什么意思,以及input.sequenced(through: flatten, dense)是一个什么用法,sequenced方法和through参数分别代表什么意思,和keras的sequential类似吗,我可以input.sequenced(through: flatten, dense1, dense2)
  • 代码加上一定的注释,比如声明全连接层和其他层的时候说一下这个层是什么
  • optimizer.update(&model.self, along: grads)似乎直接传入了整个模型,along参数也没有见过。这个地方具体是一个怎样的操作,比如我有办法通过这种方式更新模型的部分参数吗

@snowkylin
Copy link
Owner

snowkylin commented Nov 12, 2019

外加两点:

@huan
Copy link
Collaborator Author

huan commented Nov 13, 2019

Ok. Working on those comments now.

  • Input BULLET(•) on Mac: Option + 8. However, I believe it will be better to be replaced by the TensorFlow.matmul(a, b), which will be more clear for the readers.

huan added a commit to huan/docker-swift-tensorflow that referenced this issue Nov 14, 2019
@huan huan mentioned this issue Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants