Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleGAN
提交
f9aa9307
P
PaddleGAN
项目概览
PaddlePaddle
/
PaddleGAN
大约 2 年 前同步成功
通知
100
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看板
提交
f9aa9307
编写于
10月 22, 2020
作者:
L
LielinJiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rm unused code
上级
17628bbb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
0 addition
and
25 deletion
+0
-25
ppgan/models/base_model.py
ppgan/models/base_model.py
+0
-7
ppgan/models/cycle_gan_model.py
ppgan/models/cycle_gan_model.py
+0
-18
未找到文件。
ppgan/models/base_model.py
浏览文件 @
f9aa9307
...
@@ -95,11 +95,6 @@ class BaseModel(ABC):
...
@@ -95,11 +95,6 @@ class BaseModel(ABC):
def
get_current_visuals
(
self
):
def
get_current_visuals
(
self
):
"""Return visualization images."""
"""Return visualization images."""
# visual_ret = OrderedDict()
# for name in self.visual_names:
# if isinstance(name, str) and hasattr(self, name):
# visual_ret[name] = getattr(self, name)
# return visual_ret
return
self
.
visual_items
return
self
.
visual_items
def
get_current_losses
(
self
):
def
get_current_losses
(
self
):
...
@@ -117,6 +112,4 @@ class BaseModel(ABC):
...
@@ -117,6 +112,4 @@ class BaseModel(ABC):
for
net
in
nets
:
for
net
in
nets
:
if
net
is
not
None
:
if
net
is
not
None
:
for
param
in
net
.
parameters
():
for
param
in
net
.
parameters
():
# print('trainable:', param.trainable)
param
.
trainable
=
requires_grad
param
.
trainable
=
requires_grad
# param.stop_gradient = not requires_grad
ppgan/models/cycle_gan_model.py
浏览文件 @
f9aa9307
...
@@ -32,19 +32,6 @@ class CycleGANModel(BaseModel):
...
@@ -32,19 +32,6 @@ class CycleGANModel(BaseModel):
"""
"""
super
(
CycleGANModel
,
self
).
__init__
(
cfg
)
super
(
CycleGANModel
,
self
).
__init__
(
cfg
)
# if identity loss is used, we also visualize idt_B=G_A(B) ad idt_A=G_A(B)
# if self.is_train and self.cfg.lambda_identity > 0.0:
# visual_names_A.append('idt_B')
# visual_names_B.append('idt_A')
# combine visualizations for A and B
# self.visual_names = visual_names_A + visual_names_B
# specify the models you want to save to the disk.
# if self.is_train:
# self.model_names = ['G_A', 'G_B', 'D_A', 'D_B']
# else: # during test time, only load Gs
# self.model_names = ['G_A', 'G_B']
# define networks (both Generators and discriminators)
# define networks (both Generators and discriminators)
# The naming is different from those used in the paper.
# The naming is different from those used in the paper.
# Code (vs. paper): G_A (G), G_B (F), D_A (D_Y), D_B (D_X)
# Code (vs. paper): G_A (G), G_B (F), D_A (D_Y), D_B (D_X)
...
@@ -84,11 +71,6 @@ class CycleGANModel(BaseModel):
...
@@ -84,11 +71,6 @@ class CycleGANModel(BaseModel):
parameter_list
=
self
.
nets
[
'netD_A'
].
parameters
()
+
parameter_list
=
self
.
nets
[
'netD_A'
].
parameters
()
+
self
.
nets
[
'netD_B'
].
parameters
())
self
.
nets
[
'netD_B'
].
parameters
())
# self.optimizers.append(self.optimizer_G)
# self.optimizers.append(self.optimizer_D)
# self.optimizer_names.extend(['optimizer_G', 'optimizer_D'])
def
set_input
(
self
,
input
):
def
set_input
(
self
,
input
):
"""Unpack input data from the dataloader and perform necessary pre-processing steps.
"""Unpack input data from the dataloader and perform necessary pre-processing steps.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录