My model is based on cyclegan model,its about 600 lines, and part of it is here:https://gist.github.com/yingdiLee/de3c8c13a06109249aa78838e584a4e7 266. If it is not clear enough, I can provide all of the source code, thank you for your help !