It technically is possible to do everything in Go.
In practice (both in terms of convenience APIs and documentation), I'd say that:
- Serving models should be reasonably convenient today (and does not require Python)
- Training models is a little less so, but not too out of whack (and does not require Python)
- Constructing models is not convenient at all. Thus, model construction is probably still best in Python and there are no short term plans to changer that.
More detail:
(b) "Training": A training loop typically involves running the "train_op" in the graph and then periodically operations to save checkpoints or summaries. The API is a bit lower level that the convenience offered by the Python Estimator API, but not terribly out of whack I think. For example, see
https://github.com/asimshankar/go-tensorflow/tree/master/train. Again, the program that trains the model has no dependency on Python. Thus, for example, model parameters can be updated by your Go application. Caveat: I'm speaking of single machine (possibly with multiple GPUs) here. Distributed training across processes is another story.
(c) "Building" models, i.e., constructing the graph. In theory this is also possible in Go since there are Go functions for every TensorFlow operation (
https://godoc.org/github.com/tensorflow/tensorflow/tensorflow/go/op). However, except for very simple graphs one will very soon begin to miss the higher level constructs like Variables, Optimizers, Layers etc. in the Python API. The net result is that it is possible to build higher level APIs in Go, but as of this time the TensorFlow maintainers have not prioritized it. We encourage the opensource community to build their own higher level Go libraries.
Hope this was helpful and somewhat answers your question.
We certainly appreciate feedback, comments, bugs, feature requests etc on this on Github.
We may seek community involvement in addressing some of those though.
Looking forward to your comments,
Thanks,
-- Asim