summaryrefslogtreecommitdiff
path: root/src/python/doc
diff options
context:
space:
mode:
authorMathieuCarriere <mathieu.carriere3@gmail.com>2022-02-02 22:27:04 +0100
committerMathieuCarriere <mathieu.carriere3@gmail.com>2022-02-02 22:27:04 +0100
commitfb49c0274418a6186eafc07c946bd681f4bb7112 (patch)
tree59820ffb981eb8bbd195e17a23c3b2b020a8034e /src/python/doc
parent5dec2a6d7348e841f5742c14a9f547ef45b66d5a (diff)
fix bug in doc
Diffstat (limited to 'src/python/doc')
-rw-r--r--src/python/doc/representations.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/python/doc/representations.rst b/src/python/doc/representations.rst
index 52e95230..2d66fa68 100644
--- a/src/python/doc/representations.rst
+++ b/src/python/doc/representations.rst
@@ -58,17 +58,18 @@ PersLay
import tensorflow as tf
from sklearn.preprocessing import MinMaxScaler
import gudhi.representations as gdr
+ import gudhi.tensorflow as gdtf
diagrams = [np.array([[0.,4.],[1.,2.],[3.,8.],[6.,8.]])]
diagrams = gdr.DiagramScaler(use=True, scalers=[([0,1], MinMaxScaler())]).fit_transform(diagrams)
diagrams = tf.RaggedTensor.from_tensor(tf.constant(diagrams, dtype=tf.float32))
rho = tf.identity
- phi = gdr.GaussianPerslayPhi((100, 100), ((-.5, 1.5), (-.5, 1.5)), .1)
- weight = gdr.PowerPerslayWeight(1.,0.)
+ phi = gdtf.GaussianPerslayPhi((100, 100), ((-.5, 1.5), (-.5, 1.5)), .1)
+ weight = gdtf.PowerPerslayWeight(1.,0.)
perm_op = tf.math.reduce_sum
- perslay = gdr.Perslay(phi=phi, weight=weight, perm_op=perm_op, rho=rho)
+ perslay = gdtf.Perslay(phi=phi, weight=weight, perm_op=perm_op, rho=rho)
vectors = perslay(diagrams)
print(vectors)