MCPcopy Create free account
hub / github.com/KeepTryingTo/Pytorch-GAN / loadModel

Function loadModel

github/mainWindow.py:95–109  ·  view source on GitHub ↗

:param model: :return:

(model,root)

Source from the content-addressed store, hash-verified

93 plt.savefig('cur.png')
94
95def loadModel(model,root):
96 """
97 :param model:
98 :return:
99 """
100 # 注意这里的变量,一定要声明为全局变量,不然后面显示不出来图片
101 global tkImage
102 #生成图片
103 generagedImage(model)
104 time.sleep(1)
105 #从保存的生成器生成图片中读取该图片并显示出来
106 canvas = Canvas_(root)
107 img = cv2.imread('cur.png')
108 tkImage = showImage(img)
109 canvas.create_image(0, 0, anchor='nw', image=tkImage)
110
111#点击生成图片按钮
112def ButtonImage(model,root):

Callers 1

ButtonImageFunction · 0.70

Calls 3

generagedImageFunction · 0.70
Canvas_Function · 0.70
showImageFunction · 0.70

Tested by

no test coverage detected