复现UNIT GAN的一些tips

tech2022-09-21  64

UNIT原文是英伟达在2017年NIPS上发表的关于scene translation的GAN:

Ming-Yu Liu, Thomas Breuel, Jan Kautz, “Unsupervised Image-to-Image Translation Networks” NIPS 2017 Spotlight, arXiv:1703.00848 2017 https://arxiv.org/pdf/1703.00848.pdf

UNIT源码链接如下: https://github.com/mingyuliutw/UNIT 其中也有一个比较详细的教程

教程上python写的2.7和3.6,但是实际需要使用3.6才能跑通。

如果用2.7的话,会报关于torch.utils的若干错误,包括一个无法加载DataLoader的问题。

在Windows上运行的时候会遇到一个多线程的问题 RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase. 网上的链接都是说multiprocess的部分放在main函数里面就可以解决,if __name__ == '__main__':总体结构类似如下。但是实际上UNIT代码里面并没有找到这个多线程的设置,所以也不好改。

import parallelTestModule if __name__ == '__main__': extractor = parallelTestModule.ParallelExtractor() extractor.runInParallel(numProcesses=2, numThreads=4) 比较实际的方案还是Linux+Python3.6可以直接跑通。
最新回复(0)