Solved by arhouati in post #10 
              
              
                Finally, and after 5 days, I found the error. 
In fact, the computational graph was broken into two different places, due to two wrong operations. However, it was very difficult to debug it and find the issue source. No tools or Libs exist to visualize the graph, which is the main component for the …