diff options
author | MathieuCarriere <mathieu.carriere3@gmail.com> | 2022-02-02 22:27:04 +0100 |
---|---|---|
committer | MathieuCarriere <mathieu.carriere3@gmail.com> | 2022-02-02 22:27:04 +0100 |
commit | fb49c0274418a6186eafc07c946bd681f4bb7112 (patch) | |
tree | 59820ffb981eb8bbd195e17a23c3b2b020a8034e /src/python/doc | |
parent | 5dec2a6d7348e841f5742c14a9f547ef45b66d5a (diff) |
fix bug in doc
Diffstat (limited to 'src/python/doc')
-rw-r--r-- | src/python/doc/representations.rst | 7 |
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) |