@tom
I tried to eliminate as many loops a I could. And I am not able to think of any way of eliminating these ones that are left.
Can you suggest some way on how can I do this?
This is what I am trying to calculate.
($ z_i $ is a one-dim tensor(Encoder output) , $ \mu_j $ is also a on-dim tensor after doing some manipulations on $$z_i$$ )
Any help is appreciated