Skip to content

Commit

Permalink
Fixed bug in CycleGANModel test mode
Browse files Browse the repository at this point in the history
Removed unnecessary comparison when using CycleGANModel for comparison
  • Loading branch information
taesungp authored Apr 6, 2017
1 parent 2653369 commit 31b7884
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions models/cycle_gan_model.lua
Original file line number Diff line number Diff line change
Expand Up @@ -294,21 +294,17 @@ local function MakeIm3(im)
end

function CycleGANModel:GetCurrentVisuals(opt, size)
if not size then
size = opt.display_winsize
end

local visuals = {}
table.insert(visuals, {img=MakeIm3(self.real_A), label='real_A'})
table.insert(visuals, {img=MakeIm3(self.fake_B), label='fake_B'})
table.insert(visuals, {img=MakeIm3(self.rec_A), label='rec_A'})
if opt.identity > 0 then
if opt.test == 0 and opt.identity > 0 then
table.insert(visuals, {img=MakeIm3(self.identity_A), label='identity_A'})
end
table.insert(visuals, {img=MakeIm3(self.real_B), label='real_B'})
table.insert(visuals, {img=MakeIm3(self.fake_A), label='fake_A'})
table.insert(visuals, {img=MakeIm3(self.rec_B), label='rec_B'})
if opt.identity > 0 then
if opt.test == 0 and opt.identity > 0 then
table.insert(visuals, {img=MakeIm3(self.identity_B), label='identity_B'})
end
return visuals
Expand Down

0 comments on commit 31b7884

Please sign in to comment.