本文为🔗365天深度学习训练营 中的学习记录博客
原作者:K同学啊
本周任务详情:
- 了解并学习Pix2Pix算法
- 画出本文代码中Pix2Pix的生成器网络结构
前言
在之前的教案中,介绍了GAN可用作图像的生成,它在MNIST数据集上取得了非常好的效果。GAN的一个问题是它无法对生成模型生成的数据进行控制,为了解决这个问题,条件GAN(Conditional GAN,CGAN)提出了将在生成模型和判别模型中都加入条件信息来引导模型的训练,实现了生成内容的可控。这里要介绍的 Pix2Pix 是一个以CGAN为基础,用于图像翻译(Image Translation)的通用框架,旨在将一个图像域中的图像转换成另一个图像域中的图像,它实现了模型结构和损失函数的通用化,并在诸多图像翻译数据集上取得了令人瞩目的效果(图1),是进阶GAN,入门图像翻译必读的一篇文章(《Image-to-Image Translation with Conditional Adversarial Networks》)。
图1:Pix2Pix在诸多图像翻译任务上的翻译结果:
- 背景知识
1.1 图像翻译
在介绍图像翻译的概念前,我们需要先理解图像内容(Image Content)、图像域(Image Domain)与图像翻译这三个概念。
●图像内容:指的是图像的固有内容,它是区分不同图像的依据。
●图像域:指在特定上下文中所涵盖的一组图像的集合,这些图像通常具有某种相似性或共同特征。图像域可以用来表示一类具有共同属性或内容的图像。在图像处理和计算机视觉领域,图像域常常被用于描述参与某项任务或问题的图像集合。
●图像翻译:是将一个物体的图像表征转换为该物体的另一个表征,例如根据皮包的轮廓图得到皮包的彩色图。也就是找到一个函数,能让域A的图像映射到域B,从而实现图像的跨域转换。
1.2 CGAN
由之前的教案我们可以知道,条件生成对抗网络(CGAN)是在生成对抗网络(GAN)的基础上进行了一些改进。对于原始GAN的生成器而言,其生成的图像数据是随机不可预测的,因此我们无法控制网络的输出,在实际操作中的可控性不强。
针对上述原始GAN无法生成具有特定属性的图像数据的问题,Mehdi Mirza等人在2014年提出了条件生成对抗网络,通过给原始生成对抗网络中的生成器G和判别器D增加额外的条件,例如我们需要生成器G生成一张没有阴影的图像,此时判别器D就需要判断生成器所生成的图像是否是一张没有阴影的图像。条件生成对抗网络的本质是将额外添加的信息融入到生成器和判别器中,其中添加的信息可以是图像的类别、人脸表情和其他辅助信息等,旨在把无监督学习的GAN转化为有监督学习的CGAN,便于网络能够在我们的掌控下更好地进行训练。CGAN网络结构如图2所示。
图2:条件生成对抗网络结构
由图2的网络结构可知,条件信息 y 作为额外的输入被引入对抗网络中,与生成器中的噪声 z 合并作为隐含层表达;而在判别器D中,条件信息 y 则与原始数据
x 合并作为判别函数的输入。这种改进在以后的诸多方面研究中被证明是非常有效的,也为后续的相关工作提供了积极的指导作用。
对于GAN,它的损失函数可以定义为式(1)。
对于CGAN的损失函数,我们只需要使用图2中的 G(z∣y) 和 D(x∣y) 替代式(1)中的
G(z) 和 D(x) 即可,如式(2)。
1.3 U-Net
U-Net是一个用于医学图像分割的全卷积模型(图3)。它分为两个部分,其中左侧是由卷积和降采样操作组成的压缩路径,右侧是由卷积和上采样组成的扩张路径,扩张的每个网络块的输入由上一层上采样的特征和压缩路径部分的特征拼接而成。网络模型整体是一个U形的结构,因此被叫做U-Net。
图3:U-Net的网络结构
分割任务是图像翻译任务的一个分支,因此U-Net也可以被用作其它的图像翻译任务,这里要介绍的Pix2Pix便是采用了U-Net作为主体结构。
- Pix2Pix解析
在Pix2Pix中,图像翻译任务可以建模为给定一个输入数据 x 和随机噪声 z ,生成目标图像 y,即 G:{x,z}→y。与传统的CGAN不同的是,在Pix2Pix中判别器的输入是生成图像 G(x)(或者是目标图像 y )和源图像 x ,而生成器的输入是源图像 x 和随机噪声 z ,如图4所示。
图4:Pix2Pix的训练过程
下面从Pix2Pix的损失函数和模型结构两个方面来介绍Pix2Pix。
2.1 损失函数
因为Pix2Pix和CGAN的输入数据不同了,所以它们的损失函数也要对应的进行调整,CGAN的损失函数可表示为式(3)。
如[5]中所介绍的,我们可以在损失函数中加入正则项来提升生成图像的质量,不同的是Pix2Pix使用的是L1正则和不是[5]中使用的L2正则,如式(4)。使用L1正则有助于使生成的图像更清楚。
我们最终目标是在正则约束情况下的生成器和判别器的最大最小博弈,如式(5)。
之所以在生成数据中加入随机噪声 z,是为了使生成模型生成的数据具有一定的随机性,但是实验结果表明完全随机的噪声并不会产生特别有效的效果。在这里,Pix2Pix是通过在生成器的模型层中加入Dropout来引入随机噪声的,但是Dropout带来输出内容的随机性并没有很大。
2.2 模型结构
Pix2Pix使用了CNN中常用的卷积 + BN + ReLU的模型结构,它们的具体细节介绍如下。
2.2.1 生成器
对于图像翻译这类任务来说,经典的编码器-解码器结构是最优的选择。Pix2Pix的官方源码是使用Lua实现的,这里我们通过它的官方源码给出Pix2Pix的具体结构,如图5。需要注意如下几点细节:
1、Pix2Pix使用的是以U-Net为基础的结构,即在压缩路径和扩张路径之间添加一个跳跃连接;
2、Pix2Pix的输入图像的大小是 256 × 256 ;
3、每个操作仅进行了三次降采样,每次降采样的通道数均乘以2,初始的通道数是64;
4、在压缩路径中,每个箭头表示的操作是卷积核大小为 4×4 的相同卷积+BN+ReLU,它根据是否降采样来控制卷积的步长;
5、在扩张路径中,它使用的是反卷积上采样;
6、压缩路径和扩张路径使用的是拼接操作进行特征融合。
图5:Pix2Pix的生成器的网络结构
2.2.2 判别器(PatchGAN)
传统GAN的一个棘手的问题是它生成的图像普遍比较模糊,一个重要的原因是它使用了整图作为判别器的输入。不同于传统的方法,将整个图像作为判别器判别的目标(输入),Pix2Pix提出了将输入图像分成 N×N 个图像块(Patch),然后将这些图像块依次提供给判别器,因此这个方法被命名为PatchGAN,PatchGAN可以看做针对图像纹理的损失。表1的实验结果表明,当 N=70 时模型的表现最好,但是从图6的生成图像来看,N 越大,生成的图像质量越高。其中 1×1 大小的图像块的判别器又被叫做PixelGAN。
表1:不同N的大小在FCN模型小的准确率表现
图6:不同大小的N生成的图像
对于不同大小的 N,我们需要根据 N 的值来调整判别器的层数,进而得到最合适的模型感受野,我们可以根据表2给出的层数计算出模型的感受野,进而选择Patch的大小和层数的关系。
- 代码运行
项目文件结构(代码运行:直接运行pix2pix.py即可):
datasets.py的代码内容:
import glob
import random
import os
import numpy as np
from torch.utils.data import Dataset
from PIL import Image
import torchvision.transforms as transforms
class ImageDataset(Dataset):
def __init__(self, root, transforms_=None, mode="train"):
self.transform = transforms.Compose(transforms_)
self.files = sorted(glob.glob(os.path.join(root, mode) + "/*.*"))
if mode == "train":
self.files.extend(sorted(glob.glob(os.path.join(root, "test") + "/*.*")))
def __getitem__(self, index):
img = Image.open(self.files[index % len(self.files)])
w, h = img.size
img_A = img.crop((0, 0, w / 2, h))
img_B = img.crop((w / 2, 0, w, h))
if np.random.random() < 0.5:
img_A = Image.fromarray(np.array(img_A)[:, ::-1, :], "RGB")
img_B = Image.fromarray(np.array(img_B)[:, ::-1, :], "RGB")
img_A = self.transform(img_A)
img_B = self.transform(img_B)
return {"A": img_A, "B": img_B}
def __len__(self):
return len(self.files)
models.py的代码内容:
import torch.nn as nn
import torch.nn.functional as F
import torch
def weights_init_normal(m):
classname = m.__class__.__name__
if classname.find("Conv") != -1:
torch.nn.init.normal_(m.weight.data, 0.0, 0.02)
elif classname.find("BatchNorm2d") != -1:
torch.nn.init.normal_(m.weight.data, 1.0, 0.02)
torch.nn.init.constant_(m.bias.data, 0.0)
##############################
# U-NET
##############################
class UNetDown(nn.Module):
def __init__(self, in_size, out_size, normalize=True, dropout=0.0):
super(UNetDown, self).__init__()
layers = [nn.Conv2d(in_size, out_size, 4, 2, 1, bias=False)]
if normalize:
layers.append(nn.InstanceNorm2d(out_size))
layers.append(nn.LeakyReLU(0.2))
if dropout:
layers.append(nn.Dropout(dropout))
self.model = nn.Sequential(*layers)
def forward(self, x):
return self.model(x)
class UNetUp(nn.Module):
def __init__(self, in_size, out_size, dropout=0.0):
super(UNetUp, self).__init__()
layers = [
nn.ConvTranspose2d(in_size, out_size, 4, 2, 1, bias=False),
nn.InstanceNorm2d(out_size),
nn.ReLU(inplace=True),
]
if dropout:
layers.append(nn.Dropout(dropout))
self.model = nn.Sequential(*layers)
def forward(self, x, skip_input):
x = self.model(x)
x = torch.cat((x, skip_input), 1)
return x
class GeneratorUNet(nn.Module):
def __init__(self, in_channels=3, out_channels=3):
super(GeneratorUNet, self).__init__()
self.down1 = UNetDown(in_channels, 64, normalize=False)
self.down2 = UNetDown(64, 128)
self.down3 = UNetDown(128, 256)
self.down4 = UNetDown(256, 512, dropout=0.5)
self.down5 = UNetDown(512, 512, dropout=0.5)
self.down6 = UNetDown(512, 512, dropout=0.5)
self.down7 = UNetDown(512, 512, dropout=0.5)
self.down8 = UNetDown(512, 512, normalize=False, dropout=0.5)
self.up1 = UNetUp(512, 512, dropout=0.5)
self.up2 = UNetUp(1024, 512, dropout=0.5)
self.up3 = UNetUp(1024, 512, dropout=0.5)
self.up4 = UNetUp(1024, 512, dropout=0.5)
self.up5 = UNetUp(1024, 256)
self.up6 = UNetUp(512, 128)
self.up7 = UNetUp(256, 64)
self.final = nn.Sequential(
nn.Upsample(scale_factor=2),
nn.ZeroPad2d((1, 0, 1, 0)),
nn.Conv2d(128, out_channels, 4, padding=1),
nn.Tanh(),
)
def forward(self, x):
# U-Net generator with skip connections from encoder to decoder
d1 = self.down1(x)
d2 = self.down2(d1)
d3 = self.down3(d2)
d4 = self.down4(d3)
d5 = self.down5(d4)
d6 = self.down6(d5)
d7 = self.down7(d6)
d8 = self.down8(d7)
u1 = self.up1(d8, d7)
u2 = self.up2(u1, d6)
u3 = self.up3(u2, d5)
u4 = self.up4(u3, d4)
u5 = self.up5(u4, d3)
u6 = self.up6(u5, d2)
u7 = self.up7(u6, d1)
return self.final(u7)
##############################
# Discriminator
##############################
class Discriminator(nn.Module):
def __init__(self, in_channels=3):
super(Discriminator, self).__init__()
def discriminator_block(in_filters, out_filters, normalization=True):
"""Returns downsampling layers of each discriminator block"""
layers = [nn.Conv2d(in_filters, out_filters, 4, stride=2, padding=1)]
if normalization:
layers.append(nn.InstanceNorm2d(out_filters))
layers.append(nn.LeakyReLU(0.2, inplace=True))
return layers
self.model = nn.Sequential(
*discriminator_block(in_channels * 2, 64, normalization=False),
*discriminator_block(64, 128),
*discriminator_block(128, 256),
*discriminator_block(256, 512),
nn.ZeroPad2d((1, 0, 1, 0)),
nn.Conv2d(512, 1, 4, padding=1, bias=False)
)
def forward(self, img_A, img_B):
# Concatenate image and condition image by channels to produce input
img_input = torch.cat((img_A, img_B), 1)
return self.model(img_input)
pix2pix.py的代码内容:
import argparse
import time
import datetime
import sys
import torchvision.transforms as transforms
from torchvision.utils import save_image
from torch.utils.data import DataLoader
from torch.autograd import Variable
from models import *
from datasets import *
import torch.nn as nn
import torch.nn.functional as F
import torch
parser = argparse.ArgumentParser()
parser.add_argument("--epoch", type=int, default=0, help="epoch to start training from")
parser.add_argument("--n_epochs", type=int, default=100, help="number of epochs of training")
parser.add_argument("--dataset_name", type=str, default="data_facades", help="name of the dataset")
parser.add_argument("--batch_size", type=int, default=1, help="size of the batches")
parser.add_argument("--lr", type=float, default=0.0002, help="adam: learning rate")
parser.add_argument("--b1", type=float, default=0.5, help="adam: decay of first order momentum of gradient")
parser.add_argument("--b2", type=float, default=0.999, help="adam: decay of first order momentum of gradient")
parser.add_argument("--decay_epoch", type=int, default=100, help="epoch from which to start lr decay")
parser.add_argument("--n_cpu", type=int, default=8, help="number of cpu threads to use during batch generation")
parser.add_argument("--img_height", type=int, default=256, help="size of image height")
parser.add_argument("--img_width", type=int, default=256, help="size of image width")
parser.add_argument("--channels", type=int, default=3, help="number of image channels")
parser.add_argument(
"--sample_interval", type=int, default=500, help="interval between sampling of images from generators"
)
parser.add_argument("--checkpoint_interval", type=int, default=-1, help="interval between model checkpoints")
opt = parser.parse_args()
print(opt)
os.makedirs("images/%s" % opt.dataset_name, exist_ok=True)
os.makedirs("saved_models/%s" % opt.dataset_name, exist_ok=True)
cuda = True if torch.cuda.is_available() else False
# Loss functions
criterion_GAN = torch.nn.MSELoss()
criterion_pixelwise = torch.nn.L1Loss()
# Loss weight of L1 pixel-wise loss between translated image and real image
lambda_pixel = 100
# Calculate output of image discriminator (PatchGAN)
patch = (1, opt.img_height // 2 ** 4, opt.img_width // 2 ** 4)
# Initialize generator and discriminator
generator = GeneratorUNet()
discriminator = Discriminator()
if cuda:
generator = generator.cuda()
discriminator = discriminator.cuda()
criterion_GAN.cuda()
criterion_pixelwise.cuda()
if opt.epoch != 0:
# Load pretrained models
generator.load_state_dict(torch.load("saved_models/%s/generator_%d.pth" % (opt.dataset_name, opt.epoch)))
discriminator.load_state_dict(torch.load("saved_models/%s/discriminator_%d.pth" % (opt.dataset_name, opt.epoch)))
else:
# Initialize weights
generator.apply(weights_init_normal)
discriminator.apply(weights_init_normal)
# Optimizers
optimizer_G = torch.optim.Adam(generator.parameters(), lr=opt.lr, betas=(opt.b1, opt.b2))
optimizer_D = torch.optim.Adam(discriminator.parameters(), lr=opt.lr, betas=(opt.b1, opt.b2))
# Configure dataloaders
transforms_ = [
transforms.Resize((opt.img_height, opt.img_width), Image.BICUBIC),
transforms.ToTensor(),
transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),
]
dataloader = DataLoader(
ImageDataset("./%s" % opt.dataset_name, transforms_=transforms_),
batch_size=opt.batch_size,
shuffle=True,
num_workers=opt.n_cpu,
)
val_dataloader = DataLoader(
ImageDataset("./%s" % opt.dataset_name, transforms_=transforms_, mode="val"),
batch_size=10,
shuffle=True,
num_workers=1,
)
# Tensor type
Tensor = torch.cuda.FloatTensor if cuda else torch.FloatTensor
def sample_images(batches_done):
"""Saves a generated sample from the validation set"""
imgs = next(iter(val_dataloader))
real_A = Variable(imgs["B"].type(Tensor))
real_B = Variable(imgs["A"].type(Tensor))
fake_B = generator(real_A)
img_sample = torch.cat((real_A.data, fake_B.data, real_B.data), -2)
save_image(img_sample, "images/%s/%s.png" % (opt.dataset_name, batches_done), nrow=5, normalize=True)
# ----------
# Training
# ----------
if __name__ == '__main__':
prev_time = time.time()
for epoch in range(opt.epoch, opt.n_epochs):
for i, batch in enumerate(dataloader):
# Model inputs
real_A = Variable(batch["B"].type(Tensor))
real_B = Variable(batch["A"].type(Tensor))
# Adversarial ground truths
valid = Variable(Tensor(np.ones((real_A.size(0), *patch))), requires_grad=False)
fake = Variable(Tensor(np.zeros((real_A.size(0), *patch))), requires_grad=False)
# ------------------
# Train Generators
# ------------------
optimizer_G.zero_grad()
# GAN loss
fake_B = generator(real_A)
pred_fake = discriminator(fake_B, real_A)
loss_GAN = criterion_GAN(pred_fake, valid)
# Pixel-wise loss
loss_pixel = criterion_pixelwise(fake_B, real_B)
# Total loss
loss_G = loss_GAN + lambda_pixel * loss_pixel
loss_G.backward()
optimizer_G.step()
# ---------------------
# Train Discriminator
# ---------------------
optimizer_D.zero_grad()
# Real loss
pred_real = discriminator(real_B, real_A)
loss_real = criterion_GAN(pred_real, valid)
# Fake loss
pred_fake = discriminator(fake_B.detach(), real_A)
loss_fake = criterion_GAN(pred_fake, fake)
# Total loss
loss_D = 0.5 * (loss_real + loss_fake)
loss_D.backward()
optimizer_D.step()
# --------------
# Log Progress
# --------------
# Determine approximate time left
batches_done = epoch * len(dataloader) + i
batches_left = opt.n_epochs * len(dataloader) - batches_done
time_left = datetime.timedelta(seconds=batches_left * (time.time() - prev_time))
prev_time = time.time()
# Print log
sys.stdout.write(
"\r[Epoch %d/%d] [Batch %d/%d] [D loss: %f] [G loss: %f, pixel: %f, adv: %f] ETA: %s"
% (
epoch,
opt.n_epochs,
i,
len(dataloader),
loss_D.item(),
loss_G.item(),
loss_pixel.item(),
loss_GAN.item(),
time_left,
)
)
# If at sample interval save image
if batches_done % opt.sample_interval == 0:
sample_images(batches_done)
if opt.checkpoint_interval != -1 and epoch % opt.checkpoint_interval == 0:
# Save model checkpoints
torch.save(generator.state_dict(), "saved_models/%s/generator_%d.pth" % (opt.dataset_name, epoch))
torch.save(discriminator.state_dict(), "saved_models/%s/discriminator_%d.pth" % (opt.dataset_name, epoch))
运行前,由于电脑配置低,我把pix2pix.py的
parser.add_argument("--n_epochs", type=int, default=100, help="number of epochs of training")
修改为:
parser.add_argument("--n_epochs", type=int, default=50, help="number of epochs of training")
100修改为50。
把
parser.add_argument("--n_cpu", type=int, default=8, help="number of cpu threads to use during batch generation")
修改为:
parser.add_argument("--n_cpu", type=int, default=2, help="number of cpu threads to use during batch generation")
8修改为2
代码输出结果:
C:\Users\Administrator\anaconda3\envs\gityolo\python.exe "E:\365-jinjieying\GAN rumenshizhan\第G5周:Pix2Pix理论与实战__pix2pix(原文代码)\pix2pix.py"
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 0/50] [Batch 0/506] [D loss: 2.294591] [G loss: 50.450096, pixel: 0.471256, adv: 3.324455] ETA: 3 days, 23:21:03.073111Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 0/50] [Batch 500/506] [D loss: 0.041174] [G loss: 41.033543, pixel: 0.398207, adv: 1.212870] ETA: 15:01:32.909241Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 0/50] [Batch 505/506] [D loss: 0.076437] [G loss: 25.782164, pixel: 0.249178, adv: 0.864333] ETA: 14:58:28.965300Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 1/50] [Batch 494/506] [D loss: 0.034683] [G loss: 50.122551, pixel: 0.486981, adv: 1.424486] ETA: 14:02:10.377460Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 1/50] [Batch 505/506] [D loss: 0.036544] [G loss: 39.662941, pixel: 0.387752, adv: 0.887784] ETA: 13:52:54.539438Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 2/50] [Batch 488/506] [D loss: 0.107929] [G loss: 24.452902, pixel: 0.240541, adv: 0.398833] ETA: 13:23:28.853388Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 2/50] [Batch 505/506] [D loss: 0.088068] [G loss: 28.888634, pixel: 0.281931, adv: 0.695579] ETA: 13:40:41.803142Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 3/50] [Batch 482/506] [D loss: 0.019595] [G loss: 36.423977, pixel: 0.354797, adv: 0.944319] ETA: 13:13:11.011500Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 3/50] [Batch 505/506] [D loss: 0.042477] [G loss: 27.685301, pixel: 0.269571, adv: 0.728209] ETA: 16:26:38.027925Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 4/50] [Batch 476/506] [D loss: 0.008606] [G loss: 45.816917, pixel: 0.446977, adv: 1.119228] ETA: 13:38:59.348316Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 4/50] [Batch 505/506] [D loss: 0.013211] [G loss: 36.956215, pixel: 0.358460, adv: 1.110205] ETA: 13:42:52.120568Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 5/50] [Batch 470/506] [D loss: 0.063673] [G loss: 28.826622, pixel: 0.279609, adv: 0.865713] ETA: 13:21:46.258678Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 5/50] [Batch 505/506] [D loss: 0.035730] [G loss: 22.613306, pixel: 0.218795, adv: 0.733813] ETA: 13:17:55.299391Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 6/50] [Batch 464/506] [D loss: 0.028884] [G loss: 32.144348, pixel: 0.312795, adv: 0.864807] ETA: 13:08:51.994486Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 6/50] [Batch 505/506] [D loss: 0.033269] [G loss: 29.667105, pixel: 0.284515, adv: 1.215582] ETA: 13:13:10.238385Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 7/50] [Batch 458/506] [D loss: 0.064922] [G loss: 32.686394, pixel: 0.318239, adv: 0.862465] ETA: 12:45:27.774596Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 7/50] [Batch 505/506] [D loss: 0.028888] [G loss: 28.744112, pixel: 0.279960, adv: 0.748107] ETA: 12:49:04.357306Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 8/50] [Batch 452/506] [D loss: 0.030297] [G loss: 49.066166, pixel: 0.477189, adv: 1.347237] ETA: 12:25:25.194168Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 8/50] [Batch 505/506] [D loss: 0.009270] [G loss: 32.631222, pixel: 0.314840, adv: 1.147260] ETA: 12:23:51.823089Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 9/50] [Batch 446/506] [D loss: 0.024606] [G loss: 32.733753, pixel: 0.315836, adv: 1.150126] ETA: 12:13:34.474845Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 9/50] [Batch 505/506] [D loss: 0.033831] [G loss: 22.078814, pixel: 0.211866, adv: 0.892223] ETA: 12:14:28.238693Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 10/50] [Batch 440/506] [D loss: 0.089706] [G loss: 28.523535, pixel: 0.268717, adv: 1.651850] ETA: 11:54:50.767908Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 10/50] [Batch 505/506] [D loss: 0.007306] [G loss: 36.701572, pixel: 0.357013, adv: 1.000229] ETA: 11:50:12.215720Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 11/50] [Batch 434/506] [D loss: 0.037444] [G loss: 29.393831, pixel: 0.282455, adv: 1.148358] ETA: 11:36:09.263768Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 11/50] [Batch 505/506] [D loss: 0.018127] [G loss: 32.942406, pixel: 0.320760, adv: 0.866432] ETA: 11:33:54.804918Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 12/50] [Batch 428/506] [D loss: 0.012240] [G loss: 33.659031, pixel: 0.325850, adv: 1.074071] ETA: 11:19:03.514061Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 12/50] [Batch 505/506] [D loss: 0.014497] [G loss: 31.498877, pixel: 0.305774, adv: 0.921465] ETA: 11:15:01.913159Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 13/50] [Batch 422/506] [D loss: 0.008955] [G loss: 42.899864, pixel: 0.419150, adv: 0.984864] ETA: 10:58:52.059216Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 13/50] [Batch 505/506] [D loss: 0.011342] [G loss: 46.629612, pixel: 0.456920, adv: 0.937612] ETA: 10:55:34.623305Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 14/50] [Batch 416/506] [D loss: 0.009564] [G loss: 31.913603, pixel: 0.308459, adv: 1.067718] ETA: 10:37:36.752396Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 14/50] [Batch 505/506] [D loss: 0.004832] [G loss: 39.774120, pixel: 0.386827, adv: 1.091419] ETA: 10:35:36.028805Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 15/50] [Batch 410/506] [D loss: 0.005213] [G loss: 32.505280, pixel: 0.314164, adv: 1.088850] ETA: 10:27:10.650401Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 15/50] [Batch 505/506] [D loss: 0.013599] [G loss: 22.802753, pixel: 0.217653, adv: 1.037426] ETA: 10:23:26.816654Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 16/50] [Batch 404/506] [D loss: 0.005076] [G loss: 24.453619, pixel: 0.234113, adv: 1.042280] ETA: 10:08:12.811203Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 16/50] [Batch 505/506] [D loss: 0.007849] [G loss: 41.962780, pixel: 0.408530, adv: 1.109791] ETA: 10:00:23.586087Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 17/50] [Batch 398/506] [D loss: 0.006598] [G loss: 30.941166, pixel: 0.299840, adv: 0.957166] ETA: 10:55:40.770102Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 17/50] [Batch 505/506] [D loss: 0.004773] [G loss: 21.682217, pixel: 0.206727, adv: 1.009484] ETA: 11:52:44.678854Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 18/50] [Batch 392/506] [D loss: 0.004337] [G loss: 22.770840, pixel: 0.217682, adv: 1.002599] ETA: 11:37:48.637848Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 18/50] [Batch 505/506] [D loss: 0.003957] [G loss: 29.407816, pixel: 0.284587, adv: 0.949135] ETA: 10:38:50.631628Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 19/50] [Batch 386/506] [D loss: 0.005030] [G loss: 44.669186, pixel: 0.436307, adv: 1.038513] ETA: 12:05:59.765768Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 19/50] [Batch 505/506] [D loss: 0.006733] [G loss: 35.090420, pixel: 0.340574, adv: 1.032977] ETA: 11:46:47.424139Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 20/50] [Batch 380/506] [D loss: 0.003278] [G loss: 40.476151, pixel: 0.394928, adv: 0.983336] ETA: 11:34:26.665649Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 20/50] [Batch 505/506] [D loss: 0.002734] [G loss: 26.657700, pixel: 0.256703, adv: 0.987352] ETA: 13:54:11.617855Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 21/50] [Batch 374/506] [D loss: 0.005159] [G loss: 22.626410, pixel: 0.216645, adv: 0.961924] ETA: 12:33:16.415591Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 21/50] [Batch 505/506] [D loss: 0.005120] [G loss: 22.735989, pixel: 0.217343, adv: 1.001686] ETA: 11:46:10.174675Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 22/50] [Batch 368/506] [D loss: 0.008139] [G loss: 38.265900, pixel: 0.373301, adv: 0.935766] ETA: 11:45:13.375998Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 22/50] [Batch 505/506] [D loss: 0.001991] [G loss: 29.068344, pixel: 0.280420, adv: 1.026298] ETA: 11:01:02.758941Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 23/50] [Batch 362/506] [D loss: 0.002682] [G loss: 38.057262, pixel: 0.370525, adv: 1.004765] ETA: 7:37:19.396214Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 23/50] [Batch 505/506] [D loss: 0.003436] [G loss: 33.724159, pixel: 0.327453, adv: 0.978831] ETA: 7:20:42.401633Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 24/50] [Batch 356/506] [D loss: 0.020935] [G loss: 23.211594, pixel: 0.221822, adv: 1.029410] ETA: 7:04:19.902954Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 24/50] [Batch 505/506] [D loss: 0.001128] [G loss: 24.473412, pixel: 0.234851, adv: 0.988352] ETA: 7:13:58.537061Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 25/50] [Batch 350/506] [D loss: 0.002886] [G loss: 26.097609, pixel: 0.251233, adv: 0.974278] ETA: 7:04:47.480092Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 25/50] [Batch 505/506] [D loss: 0.000760] [G loss: 26.582714, pixel: 0.255882, adv: 0.994483] ETA: 7:12:33.944200Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 26/50] [Batch 344/506] [D loss: 0.003899] [G loss: 40.617554, pixel: 0.396333, adv: 0.984302] ETA: 6:41:06.533232Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 26/50] [Batch 505/506] [D loss: 0.004075] [G loss: 20.130695, pixel: 0.191301, adv: 1.000601] ETA: 6:21:03.951912Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 27/50] [Batch 338/506] [D loss: 0.004529] [G loss: 26.737444, pixel: 0.257097, adv: 1.027723] ETA: 6:22:48.066645Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 27/50] [Batch 505/506] [D loss: 0.001882] [G loss: 37.497128, pixel: 0.364352, adv: 1.061955] ETA: 6:07:02.352551Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 28/50] [Batch 332/506] [D loss: 0.001932] [G loss: 28.623562, pixel: 0.275528, adv: 1.070771] ETA: 6:15:10.226727Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 28/50] [Batch 505/506] [D loss: 0.003446] [G loss: 30.789516, pixel: 0.297806, adv: 1.008870] ETA: 5:50:31.431920Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 29/50] [Batch 326/506] [D loss: 0.003476] [G loss: 37.053715, pixel: 0.360881, adv: 0.965592] ETA: 5:56:02.724304Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 29/50] [Batch 505/506] [D loss: 0.007186] [G loss: 21.457544, pixel: 0.204218, adv: 1.035706] ETA: 5:56:32.182518Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 30/50] [Batch 320/506] [D loss: 0.004043] [G loss: 20.849277, pixel: 0.198459, adv: 1.003419] ETA: 5:24:48.413334Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 30/50] [Batch 505/506] [D loss: 0.005574] [G loss: 20.358809, pixel: 0.193053, adv: 1.053474] ETA: 5:25:40.839543Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 31/50] [Batch 314/506] [D loss: 0.003016] [G loss: 31.118565, pixel: 0.301939, adv: 0.924654] ETA: 5:11:33.206120Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 31/50] [Batch 505/506] [D loss: 0.116419] [G loss: 29.773043, pixel: 0.292741, adv: 0.498948] ETA: 5:08:05.436406Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 32/50] [Batch 308/506] [D loss: 0.003188] [G loss: 23.058184, pixel: 0.219999, adv: 1.058320] ETA: 4:58:08.211632Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 32/50] [Batch 505/506] [D loss: 0.001388] [G loss: 25.257830, pixel: 0.242793, adv: 0.978520] ETA: 4:55:30.572670Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 33/50] [Batch 302/506] [D loss: 0.000666] [G loss: 22.610992, pixel: 0.215996, adv: 1.011442] ETA: 4:48:46.021242Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 33/50] [Batch 505/506] [D loss: 0.001660] [G loss: 26.556839, pixel: 0.255688, adv: 0.988024] ETA: 4:47:30.578053Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 34/50] [Batch 296/506] [D loss: 0.000617] [G loss: 27.341011, pixel: 0.263387, adv: 1.002339] ETA: 4:22:58.652430Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 34/50] [Batch 505/506] [D loss: 0.003151] [G loss: 33.162430, pixel: 0.320766, adv: 1.085806] ETA: 4:31:00.654679Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 35/50] [Batch 290/506] [D loss: 0.000922] [G loss: 29.641394, pixel: 0.286440, adv: 0.997344] ETA: 4:01:35.831990Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 35/50] [Batch 505/506] [D loss: 0.001865] [G loss: 25.287819, pixel: 0.242556, adv: 1.032245] ETA: 4:04:00.579498Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 36/50] [Batch 284/506] [D loss: 0.000946] [G loss: 23.060852, pixel: 0.220433, adv: 1.017557] ETA: 3:58:08.720036Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 36/50] [Batch 505/506] [D loss: 0.005097] [G loss: 30.043249, pixel: 0.290353, adv: 1.007936] ETA: 3:47:43.170660Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 37/50] [Batch 278/506] [D loss: 0.002614] [G loss: 30.915298, pixel: 0.299223, adv: 0.992965] ETA: 3:34:17.159257Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 37/50] [Batch 505/506] [D loss: 0.001053] [G loss: 30.534687, pixel: 0.295506, adv: 0.984120] ETA: 3:22:28.722082Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 38/50] [Batch 272/506] [D loss: 0.000427] [G loss: 23.386000, pixel: 0.224023, adv: 0.983690] ETA: 3:17:11.063604Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 38/50] [Batch 505/506] [D loss: 0.001371] [G loss: 30.445961, pixel: 0.294483, adv: 0.997675] ETA: 3:09:09.573551Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 39/50] [Batch 266/506] [D loss: 0.001775] [G loss: 21.081068, pixel: 0.200585, adv: 1.022587] ETA: 2:58:25.510879Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 39/50] [Batch 505/506] [D loss: 0.006442] [G loss: 18.681923, pixel: 0.176949, adv: 0.987016] ETA: 2:44:45.589758Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 40/50] [Batch 260/506] [D loss: 0.004705] [G loss: 19.329121, pixel: 0.183591, adv: 0.970069] ETA: 2:43:05.397720Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 40/50] [Batch 505/506] [D loss: 0.001461] [G loss: 23.397673, pixel: 0.223809, adv: 1.016809] ETA: 2:35:15.143677Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 41/50] [Batch 254/506] [D loss: 0.002713] [G loss: 24.291956, pixel: 0.233197, adv: 0.972269] ETA: 2:25:53.158712Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 41/50] [Batch 505/506] [D loss: 0.000612] [G loss: 27.163210, pixel: 0.261369, adv: 1.026277] ETA: 2:19:38.251775Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 42/50] [Batch 248/506] [D loss: 0.002542] [G loss: 21.280655, pixel: 0.202316, adv: 1.049031] ETA: 2:12:57.938509Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 42/50] [Batch 505/506] [D loss: 0.001192] [G loss: 20.001320, pixel: 0.190269, adv: 0.974429] ETA: 2:01:08.860963Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 43/50] [Batch 242/506] [D loss: 0.001136] [G loss: 22.869358, pixel: 0.219228, adv: 0.946561] ETA: 1:47:05.235415Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 43/50] [Batch 505/506] [D loss: 0.001885] [G loss: 30.201509, pixel: 0.291816, adv: 1.019866] ETA: 1:42:17.397305Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 44/50] [Batch 236/506] [D loss: 0.017674] [G loss: 23.264090, pixel: 0.224007, adv: 0.863382] ETA: 1:32:47.526627Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 44/50] [Batch 505/506] [D loss: 0.001939] [G loss: 30.699080, pixel: 0.297246, adv: 0.974449] ETA: 1:23:05.248191Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 45/50] [Batch 230/506] [D loss: 0.005011] [G loss: 21.287802, pixel: 0.204335, adv: 0.854321] ETA: 1:16:49.338069Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 45/50] [Batch 505/506] [D loss: 0.001275] [G loss: 18.911129, pixel: 0.178822, adv: 1.028896] ETA: 1:06:08.176907Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 46/50] [Batch 224/506] [D loss: 0.000925] [G loss: 31.456551, pixel: 0.304220, adv: 1.034534] ETA: 0:58:39.908810Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 46/50] [Batch 505/506] [D loss: 0.002798] [G loss: 22.123547, pixel: 0.211163, adv: 1.007285] ETA: 0:50:04.858576Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 47/50] [Batch 218/506] [D loss: 0.005135] [G loss: 26.176241, pixel: 0.251720, adv: 1.004192] ETA: 0:42:19.847898Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 47/50] [Batch 505/506] [D loss: 0.001104] [G loss: 34.416370, pixel: 0.334325, adv: 0.983901] ETA: 0:33:21.300918Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 48/50] [Batch 212/506] [D loss: 0.000899] [G loss: 21.822018, pixel: 0.208338, adv: 0.988178] ETA: 0:26:48.378410Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 48/50] [Batch 505/506] [D loss: 0.014052] [G loss: 27.516916, pixel: 0.263197, adv: 1.197189] ETA: 0:17:06.443687Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 49/50] [Batch 206/506] [D loss: 0.006650] [G loss: 26.070620, pixel: 0.249312, adv: 1.139410] ETA: 0:09:45.060024Namespace(b1=0.5, b2=0.999, batch_size=1, channels=3, checkpoint_interval=-1, dataset_name='data_facades', decay_epoch=100, epoch=0, img_height=256, img_width=256, lr=0.0002, n_cpu=2, n_epochs=50, sample_interval=500)
[Epoch 49/50] [Batch 505/506] [D loss: 0.001970] [G loss: 17.175066, pixel: 0.161774, adv: 0.997710] ETA: 0:00:01.949528
Process finished with exit code 0
上面的代码不能在jupyter notebook上直接运行,进行下面的修改就可以在jupyter notebook上运行了:
在pix2pix.p中
opt = parser.parse_args()
修改为:
opt = parser.parse_args([])
- 总结
Pix2Pix是图像翻译必读的文章之一,它的核心技术有三点:基于CGAN的损失函数,基于U-Net的生成器和基于PatchGAN的判别器。Pix2Pix 能够在诸多图像翻译任务上取得令人惊艳的效果,但因为它的输入是图像对,因此它得到的模型还是有偏的。这里的有偏指的是模型能够在与数据集近似的 x 的情况下得到令人满意的生成内容,但是如果输入 x 与训练集的偏差过大,Pix2Pix 得到的结果便不那么理想了。