step = tf.train.AdamOptimizer(learning_rate=0.01).minimize(cost)
sess = tf.InteractiveSession()
sess.run(tf.initialize_all_variables())
costs = []
n_iterations = 300
for _ in range(n_iterations):
    x = np.random.uniform(0, 1, [seq_len, batch_size, input_size])
y = np.cumsum(x, axis=0)
x_list = {key: value for key, value in zip(inputs, x)}
y_list = {key: value for key, value in zip(result, y)}
err, _ = sess.run([cost, step], feed_dict=dict(list(x_list.items()) + list(y_list.items()))
    )
costs.append(err)
plt.plot(costs)
plt.show()
Tensorflow: список тензоров для стоимости