Skip to content

Fix a few last issues with the paper #464

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

Merged
merged 2 commits into from
Nov 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions joss_paper/paper.bib
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
@Article{julia2014,
Title = {{J}ulia: A Fresh Approach to Numerical Computing},
Author = {Jeff Bezanson and Alan Edelman and Stefan Karpinski and Viral B. Shah},
Year = {2014},
Eprint = {1411.1607},
Eprintclass = {cs.MS},
Eprinttype = {arXiv},
Keywords = {tools},
Owner = {20361362},
Timestamp = {2015.12.18},
Url = {http://arxiv.org/abs/1411.1607}
@article{Julia,
author = {Bezanson, J. and Edelman, A. and Karpinski, S. and Shah, V.},
title = {Julia: A Fresh Approach to Numerical Computing},
journal = {SIAM Review},
volume = {59},
number = {1},
pages = {65-98},
year = {2017},
doi = {10.1137/141000671},
URL = {https://doi.org/10.1137/141000671},
eprint = {https://doi.org/10.1137/141000671}
}

@Article{MLandPL,
Expand Down
16 changes: 8 additions & 8 deletions joss_paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ bibliography: paper.bib
---

# Summary
TensorFlow.jl is a Julia ([@julia2014]) client library for the TensorFlow deep-learning framework ([@tensorflow2015],[@tensorflow2016]).
It allows users to define TensorFlow graphs using Julia syntax, which are interchangable with the graphs produced by Google's first-party Python TensorFlow client and can be used to perform training or inference on machine-learning models.
TensorFlow.jl is a Julia ([@Julia]) client library for the TensorFlow deep-learning framework ([@tensorflow2015],[@tensorflow2016]).
It allows users to define TensorFlow graphs using Julia syntax, which are interchangeable with the graphs produced by Google's first-party Python TensorFlow client and can be used to perform training or inference on machine-learning models.

Graphs are primarily defined by overloading native Julia functions to operate on a TensorFlow.jl `Tensor` type, which represents a node in a TensorFlow computational graph. This overloading is powered by Julia's powerful multiple-dispatch system, which in turn allows allows the vast majority of Julia's existing array-processing functionality to work as well on the new `Tensor` type as they do on native Julia arrays. User code is often unaware and thereby reusable with respect to whtether its inputs are TensorFlow tensors or native Julia arrays by utilizing _duck-typing_.
Graphs are primarily defined by overloading native Julia functions to operate on a TensorFlow.jl `Tensor` type, which represents a node in a TensorFlow computational graph. This overloading is powered by Julia's powerful multiple-dispatch system, which in turn allows allows the vast majority of Julia's existing array-processing functionality to work as well on the new `Tensor` type as they do on native Julia arrays. User code is often unaware and thereby reusable with respect to whether its inputs are TensorFlow tensors or native Julia arrays by utilizing _duck-typing_.

TensorFlow.jl has an elegant, idiomatic Julia syntax. It allows all the usual infix operators such as `+`, `-`, `*` etc. It works seamlessly with Julia's broadcast syntax as well, such as the `.*` operator. Thus `*` can correspond to matrix multiplication while `.*` corresponds to element-wise multiplication, while Python clients needs distinct `@` (or `matmul`) and `*` (or `multiply`) functions.
It also allows Julia-style indexing (e.g. `x[:, ii + end÷2]`), and concatenation (e.g. `[A B]`, `[x; y; 1]`). Its goal is to be idiomatic for Julia users while still preserving all the power and maturity of the TensorFlow computational engine.
Expand All @@ -47,12 +47,12 @@ Some examples are shown in the table below.
| Container types are parametrized by number of dimensions and element type | N/A: does not have a parametric type system | Tensors are parametrized by element type, enabling easy specialization of algorithms for different types. |


Defining TensorFlow graphs in the Python TensorFlow client can be viewed as metaprogramming, in the sense that a host language (Python) is being used to generate code in a different embedded language (the TensorFlow computational graph) (@[MLandPL]).
Defining TensorFlow graphs in the Python TensorFlow client can be viewed as metaprogramming, in the sense that a host language (Python) is being used to generate code in a different embedded language (the TensorFlow computational graph) ([@MLandPL]).
This often comes with some awkwardness, as the syntax and the semantics of the embedded language by definition do not match the host language or there would be no need for two languages to begin with.
Using TensorFlow.jl is similarly a form of meta-programming for the same reason.
However, the flexibility and meta-programming facilities offered by Julia's macro system makes Julia especially well-suited as a host language, as macros implemented in TensorFlow.jl can syntactically transform idiomatic Julia code into Julia code that constructs TensorFlow graphs. This permits users to reuse their knowledge of Julia, while users of the Python TensorFlow client essentially need to learn both Python and TensorFlow.

One example of our ability to leverage the increased expressiveness of Julia is using `@tf` macro blocks implemented in TensorFlow.jl to automatically name nodes in the TensorFlow computatioal graph.
One example of our ability to leverage the increased expressiveness of Julia is using `@tf` macro blocks implemented in TensorFlow.jl to automatically name nodes in the TensorFlow computational graph.
Nodes in a TensorFlow graph have names; these correspond to variable names in a traditional programming language.
Thus every operation, variable and placeholder takes a `name` parameter.
In most TensorFlow bindings, these must be specified manually resulting in a lot of code that includes duplicate information such as
Expand All @@ -62,7 +62,7 @@ will cause the `name` parameter on all operations occurring on the right-hand si
Since all nodes in the computational graph can automatically be assigned the same name as the corresponding Julia variable with no additional labor from TensorFlow.jl users, users get for free more intuitive debugging and graph visualisation.

Another example of the use of Julia's metaprogramming is in the automatic generation of Julia code for each operation defined by the official TensorFlow C implementation (for example, convolutions of two TensorFlow tensors).
The C API can be queried to return definitions of all operations as protobuffer descriptions, which includes the expected TensorFlow type and arity of its inputs and outputs, as well as documentation.
The C API can be queried to return definitions of all operations as protocol buffer descriptions, which includes the expected TensorFlow type and arity of its inputs and outputs, as well as documentation.
This described the operations at a sufficient level to generate the Julia code to bind to the functions in the C API and automatically generate a useful docstring for the function,.
One challenge in this is that such generated code must correct the indices to be 1-based instead of 0-based to accord with Julia convention. Various heuristics are employed by TensorFlow.jl to guess which input arguments represent indices and so should be converted.

Expand Down Expand Up @@ -95,9 +95,9 @@ TensorFlow.jl provides an interface to one of the most mature and widely deploye
It naturally therefore supports TensorFlow visualization libraries like TensorBoard. It also gains the benefits from the any optimisations made in the graph execution engine of the underlying TensorFlow C library, which includes extensive support for automatically distributing computations over multiple host machines which each have multiple GPUs.


## Acknowledgements
## Acknowledgments

* We gratefully acknowledge the 30 contributors to the TensorFlow.jl Github repository.
* We gratefully acknowledge the 30 contributors to the TensorFlow.jl GitHub repository.
* We especially thank Katie Hyatt for contributing tests and documentation.
* We thank members of Julia Computing and the broader Julia Community for various discussions, especially Mike Innes and Keno Fischer.

Expand Down