谷歌“史上最强GAN”,现在有了PyTorch预训练版,可直接玩耍 | 代码( 五 )
23class_vector = class_vector.to('cuda')
24model.to('cuda')
25
26# Generate an image
27with torch.no_grad():
28 output = model(noise_vector, class_vector, truncation)
29
30# If you have a GPU put back on CPU
31output = output.to('cpu')
32
33# If you have a sixtel compatible terminal you can display the images in the terminal
34# (see https://github.com/saitoha/libsixel for details)
35display_in_terminal(output)
36
37# Save results as png images
推荐阅读
- lck|S11转会期LCK上单人才告急!韩国无大将Morgan当先锋
- 电子竞技|水晶哥复盘S11总决赛:EDG含金量史上最强,iG都稍微差点
- 打野|S11最离谱的打野诞生!3场1次助攻0次Gank,knight:心疼chovy
- t1|Chovy大战李哥!T1冲击四强,Morgan发挥将决定HLE命运
- 旭旭宝宝|DNF:史上最强药水,旭旭宝宝靠它才刷过波罗丁,一天能赚好几百
- 上单|海外网友热议LNG击败GEN:Ale是下一个Bin!Burdol打得像Morgan
- fpx战队|FPX再度被DK打成人机,Nuguri打得像Morgan,DK英雄海让人绝望
- RNG|RNG战胜HLE,保持不败!Morgan疯狂失误,Deft守家让人泪目!
- edg战队|首轮战罢数据榜,EDG祖传KDA有点离谱,小虎登顶输出榜远超Morgan
- morgan|LCK观众:morgan进世界赛队友都有责任,LEC观众:把Nisqy送进s11就该被喷