提交 6c130aab 编写于 作者: H hypox64

fix some bugs

上级 a6994b52
...@@ -8,11 +8,11 @@ Norm = 'batch' ...@@ -8,11 +8,11 @@ Norm = 'batch'
if Norm == 'instance': if Norm == 'instance':
NormLayer_2d = nn.InstanceNorm2d NormLayer_2d = nn.InstanceNorm2d
NormLayer_3d = nn.InstanceNorm3d NormLayer_3d = nn.InstanceNorm3d
use_bias = False use_bias = True
else: else:
NormLayer_2d = nn.BatchNorm2d NormLayer_2d = nn.BatchNorm2d
NormLayer_3d = nn.BatchNorm3d NormLayer_3d = nn.BatchNorm3d
use_bias = True use_bias = False
class encoder_2d(nn.Module): class encoder_2d(nn.Module):
"""Resnet-based generator that consists of Resnet blocks between a few downsampling/upsampling operations. """Resnet-based generator that consists of Resnet blocks between a few downsampling/upsampling operations.
......
...@@ -23,7 +23,7 @@ beta1 = 0.5 ...@@ -23,7 +23,7 @@ beta1 = 0.5
use_gpu = True use_gpu = True
use_gan = False use_gan = False
use_L2 = True use_L2 = True
CONTINUE = False CONTINUE = True
lambda_L1 = 100.0 lambda_L1 = 100.0
lambda_gan = 1 lambda_gan = 1
...@@ -31,9 +31,9 @@ SAVE_FRE = 10000 ...@@ -31,9 +31,9 @@ SAVE_FRE = 10000
start_iter = 0 start_iter = 0
finesize = 128 finesize = 128
loadsize = int(finesize*1.1) loadsize = int(finesize*1.1)
batchsize = 1 batchsize = 8
perload_num = 16 perload_num = 16
savename = 'MosaicNet_test' savename = 'MosaicNet_batch'
dir_checkpoint = 'checkpoints/'+savename dir_checkpoint = 'checkpoints/'+savename
util.makedirs(dir_checkpoint) util.makedirs(dir_checkpoint)
......
...@@ -81,7 +81,7 @@ def get_bar(percent,num = 25): ...@@ -81,7 +81,7 @@ def get_bar(percent,num = 25):
bar += ']' bar += ']'
return bar+' '+str(round(percent,2))+'%' return bar+' '+str(round(percent,2))+'%'
def copyfile(scr,dst): def copyfile(src,dst):
try: try:
shutil.copyfile(src, dst) shutil.copyfile(src, dst)
except Exception as e: except Exception as e:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册