使用 torch model/path 文件生成文本到图像

Text to Image generation using torch model/path file

我训练了一个基于https://github.com/aelnouby/Text-to-Image-Synthesis的文本到图像生成模型。现在我有 2 个路径文件(一个用于生成器,另一个用于鉴别器)。如何使用此路径文件生成图像?

您需要在此处传递您的生成器路径文件。 self.generator.load_state_dict(torch.load(pre_trained_gen)) 参考 trainer.py

的第 28 行