From 2cf63500796843412eba8400643ed41062ff620b Mon Sep 17 00:00:00 2001 From: liuwei1031 Date: Wed, 6 Mar 2019 09:26:57 +0000 Subject: [PATCH] set persistable for fetched variables temporarily to pass CE, test=develop --- fluid/PaddleCV/gan/cycle_gan/trainer.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fluid/PaddleCV/gan/cycle_gan/trainer.py b/fluid/PaddleCV/gan/cycle_gan/trainer.py index 84d4c87a..07e8d22f 100644 --- a/fluid/PaddleCV/gan/cycle_gan/trainer.py +++ b/fluid/PaddleCV/gan/cycle_gan/trainer.py @@ -13,6 +13,8 @@ class GATrainer(): self.program = fluid.default_main_program().clone() with fluid.program_guard(self.program): self.fake_B = build_generator_resnet_9blocks(input_A, name="g_A") + #FIXME set persistable explicitly to pass CE + self.fake_B.persistable = True self.fake_A = build_generator_resnet_9blocks(input_B, name="g_B") self.cyc_A = build_generator_resnet_9blocks(self.fake_B, "g_B") self.cyc_B = build_generator_resnet_9blocks(self.fake_A, "g_A") @@ -58,6 +60,8 @@ class GBTrainer(): with fluid.program_guard(self.program): self.fake_B = build_generator_resnet_9blocks(input_A, name="g_A") self.fake_A = build_generator_resnet_9blocks(input_B, name="g_B") + #FIXME set persistable explicitly to pass CE + self.fake_A.persistable = True self.cyc_A = build_generator_resnet_9blocks(self.fake_B, "g_B") self.cyc_B = build_generator_resnet_9blocks(self.fake_A, "g_A") self.infer_program = self.program.clone() -- GitLab