0

as part of my work I am currently studying the code provided here : https://github.com/Era-Dorta/tf_mvg/blob/master/examples/autoencoder_mvg_chol_filters.py

I have a question about line 60 of this script, in the function decode_covar() :

log_diag_chol_precision = keras.layers.Lambda(lambda x: x[..., 0])(chol_half_weights)

What is the function which is here used by the layer Lambda ? I believe it is zero-padding, but I could use a confirmation.

I thank you in advance.

  • It's a slicing operation, see the [numpy doc on the ellipsis operator](https://numpy.org/doc/stable/user/basics.indexing.html#dimensional-indexing-tools) and this SO question: https://stackoverflow.com/questions/752602/slicing-in-python-expressions-documentation – Lescurel Mar 27 '23 at 08:36

0 Answers0