How to get the inside values of the python closure function `def spatially_regular_gen()` and `def tf_map()`?
Opened this issue · 1 comments
Thanks for sharing your code, which helped me a lot!
But I have some difficulties in understanding the data preparation details.
Could you tell me how to get the inside values of the python closure function def spatially_regular_gen()
and def tf_map()
?
It confused me for several days, hope you can help me with it!
Best regards!
Hi @Violetit,
Sorry for the late reply, spatially_regular_gen()
function is a python generator so you should be able to use a simple python print to see the values in there. The tf_map()
function is a Tensorflow function so it is part of the computational graph and you should use tf.print
to see values in this function. Remember that the tf.map
function is called in several threads by the input pipeline. The input value of this tf.map
function ar the values yielded by the spatially_regular_gen()
generator.
I hope this helps. IF the Tensorflow input pipeline is too much of a trouble, you can always switch to the PyTorch version of the code. I implemented it especially for that reason.
Best,
Hugues