Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleGAN
提交
5a88b62a
P
PaddleGAN
项目概览
PaddlePaddle
/
PaddleGAN
大约 1 年 前同步成功
通知
97
Star
7254
Fork
1210
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleGAN
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5a88b62a
编写于
10月 14, 2020
作者:
L
lijianshe02
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine psgan code according tho the reviewer's comment
上级
12e819ab
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
7 deletion
+0
-7
ppgan/models/generators/makeup.py
ppgan/models/generators/makeup.py
+0
-7
未找到文件。
ppgan/models/generators/makeup.py
浏览文件 @
5a88b62a
...
@@ -151,8 +151,6 @@ class MDNet(paddle.nn.Layer):
...
@@ -151,8 +151,6 @@ class MDNet(paddle.nn.Layer):
# Bottleneck
# Bottleneck
for
i
in
range
(
repeat_num
):
for
i
in
range
(
repeat_num
):
layers
.
append
(
ResidualBlock
(
dim_in
=
curr_dim
,
dim_out
=
curr_dim
))
layers
.
append
(
ResidualBlock
(
dim_in
=
curr_dim
,
dim_out
=
curr_dim
))
#layers.append(nn.InstanceNorm2d(curr_dim, weight_attr=None, bias_attr=None))
#layers.append(PONO())
self
.
main
=
nn
.
Sequential
(
*
layers
)
self
.
main
=
nn
.
Sequential
(
*
layers
)
...
@@ -201,7 +199,6 @@ class TNetDown(paddle.nn.Layer):
...
@@ -201,7 +199,6 @@ class TNetDown(paddle.nn.Layer):
for
i
in
range
(
repeat_num
):
for
i
in
range
(
repeat_num
):
layers
.
append
(
layers
.
append
(
ResidualBlock
(
dim_in
=
curr_dim
,
dim_out
=
curr_dim
,
mode
=
't'
))
ResidualBlock
(
dim_in
=
curr_dim
,
dim_out
=
curr_dim
,
mode
=
't'
))
#layers.append(nn.InstanceNorm2d(curr_dim, weight_attr=False, bias_attr=False))
self
.
main
=
nn
.
Sequential
(
*
layers
)
self
.
main
=
nn
.
Sequential
(
*
layers
)
...
@@ -268,7 +265,6 @@ class MANet(paddle.nn.Layer):
...
@@ -268,7 +265,6 @@ class MANet(paddle.nn.Layer):
bias_attr
=
False
))
bias_attr
=
False
))
setattr
(
self
,
"up_acts_"
+
str
(
i
),
nn
.
ReLU
())
setattr
(
self
,
"up_acts_"
+
str
(
i
),
nn
.
ReLU
())
#setattr(self, "up_betas_" + str(i), Conv2d(y_dim, curr_dim//2, kernel_size=3, padding=1))
setattr
(
setattr
(
self
,
"up_betas_"
+
str
(
i
),
self
,
"up_betas_"
+
str
(
i
),
nn
.
ConvTranspose2d
(
y_dim
,
nn
.
ConvTranspose2d
(
y_dim
,
...
@@ -276,7 +272,6 @@ class MANet(paddle.nn.Layer):
...
@@ -276,7 +272,6 @@ class MANet(paddle.nn.Layer):
kernel_size
=
4
,
kernel_size
=
4
,
stride
=
2
,
stride
=
2
,
padding
=
1
))
padding
=
1
))
#setattr(self, "up_gammas_" + str(i), Conv2d(y_dim, curr_dim//2, kernel_size=3, padding=1))
setattr
(
setattr
(
self
,
"up_gammas_"
+
str
(
i
),
self
,
"up_gammas_"
+
str
(
i
),
nn
.
ConvTranspose2d
(
y_dim
,
nn
.
ConvTranspose2d
(
y_dim
,
...
@@ -317,9 +312,7 @@ class MANet(paddle.nn.Layer):
...
@@ -317,9 +312,7 @@ class MANet(paddle.nn.Layer):
# mask softmax
# mask softmax
if
consistency_mask
is
not
None
:
if
consistency_mask
is
not
None
:
a_
=
a_
-
100.0
*
(
1
-
consistency_mask
)
a_
=
a_
-
100.0
*
(
1
-
consistency_mask
)
#a_ = a_ * consistency_mask
a
=
F
.
softmax
(
a_
,
axis
=-
1
)
a
=
F
.
softmax
(
a_
,
axis
=-
1
)
#a = a * consistency_mask
gamma
,
beta
=
self
.
simple_spade
(
y
)
gamma
,
beta
=
self
.
simple_spade
(
y
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录