tensorflow 0.16.1

Rust language bindings for TensorFlow.
1
2
3
4
5
6
7
8
9
10
11
12
import tensorflow as tf


x = tf.placeholder(tf.int32, name = 'x')
y = tf.placeholder(tf.int32, name = 'y')
z = tf.add(x, y, name = 'z')

tf.variables_initializer(tf.global_variables(), name = 'init')

definition = tf.Session().graph_def
directory = 'examples/addition'
tf.train.write_graph(definition, directory, 'model.pb', as_text=False)