Hi,
If the functions you give to these tools are also python function, then they will be slow as well. The iteration over the loop won’t be much slower than the body of the loop right?
The reason they exist I think is that tensorflow does not allow you to use python for loops (in tf1 at least) and so you need these special constructs to be able to do loops. In pytorch, you can simply use regular python code, you don’t need these special constructs.