Thanks for your complete explanation.
I will try to devise a plan to check the implementation step by step.
Yes, of course, A/B testing to get a result in deep learning is not a good idea at all even though many people think deep learning is a black box method and I have always tried to avoid doing it.
One thing came to my mind a few weeks ago was that I should learn Keras or FastAI, a high level framework that no longer calling low-level functions is needed. I may used some of those functions inappropriately in my custom definition of classes although I have custom functions manually.
Thank you again for your time.