summaryrefslogtreecommitdiff
path: root/src/python/doc/cubical_complex_tflow_itf_ref.rst
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/doc/cubical_complex_tflow_itf_ref.rst')
-rw-r--r--src/python/doc/cubical_complex_tflow_itf_ref.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/python/doc/cubical_complex_tflow_itf_ref.rst b/src/python/doc/cubical_complex_tflow_itf_ref.rst
index 18b97adf..881a2950 100644
--- a/src/python/doc/cubical_complex_tflow_itf_ref.rst
+++ b/src/python/doc/cubical_complex_tflow_itf_ref.rst
@@ -19,7 +19,7 @@ Example of gradient computed from cubical persistence
cl = CubicalLayer(dimensions=[0])
with tf.GradientTape() as tape:
- dgm = cl.call(X)[0][0]
+ dgm = cl.call(X)[0]
loss = tf.math.reduce_sum(tf.square(.5*(dgm[:,1]-dgm[:,0])))
grads = tape.gradient(loss, [X])