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

Function loadModel

DCGAN/mainWindow.py:94–108  ·  view source on GitHub ↗

:param model: :return:

(model,root)

Source from the content-addressed store, hash-verified

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