Hello, @metin_erturkler,
Your formula looks fine, and I assure you that the expected value is correct.
The problem likely lied in your code to compute a_S
and a_G
. In fact, you must use both tf.transpose
and tf.reshape
to do the job instead of just the latter, because the job requires you to reorder the dimensions. While reshape
can change the shape of the tensor, reordering requires transpose
. Mentor Paul has explained it in a link in this post.
Cheers,
Raymond