Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
564b8c6c
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
564b8c6c
编写于
10月 06, 2017
作者:
Z
zchen0211
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
gan api
上级
d0f719f7
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
10 addition
and
8 deletion
+10
-8
doc/design/gan_api.md
doc/design/gan_api.md
+10
-8
未找到文件。
doc/design/gan_api.md
浏览文件 @
564b8c6c
...
@@ -19,12 +19,12 @@ In our GAN design, we wrap it as a user-friendly easily customized python API to
...
@@ -19,12 +19,12 @@ In our GAN design, we wrap it as a user-friendly easily customized python API to
| softmax loss (done) | ? | Y |
| softmax loss (done) | ? | Y |
| reshape op (done) | ? | Y |
| reshape op (done) | ? | Y |
| Dependency Engine (done) | Jiayi | Y
*
|
| Dependency Engine (done) | Jiayi | Y
*
|
| Python API (done) |
Jiayi
| Y
*
|
| Python API (done) |
Longfei, Jiayi
| Y
*
|
| Executor (done) | Tony | Y
*
|
| Executor (done) | Tony | Y
*
|
| Multi optimizer
| ?
| Y
*
|
| Multi optimizer
(woking) | Longfei
| Y
*
|
| Optimizer with any para | ? | Y
*
|
| Optimizer with any para | ? | Y
*
|
| Concat op
| ? | N (Cond) |
| Concat op
(done)
| ? | N (Cond) |
| Repmat op
| ? | N (Cond) |
| Repmat op
(done)
| ? | N (Cond) |
<p
align=
"center"
>
<p
align=
"center"
>
...
@@ -91,7 +91,8 @@ class DCGAN(object):
...
@@ -91,7 +91,8 @@ class DCGAN(object):
-
Concatenation, batch-norm, FC operations required;
-
Concatenation, batch-norm, FC operations required;
-
Deconv layer required, which is missing now...
-
Deconv layer required, which is missing now...
```
python
```
python
def
generator
(
self
,
z
,
y
=
None
):
class
DCGAN
(
object
):
def
generator
(
self
,
z
,
y
=
None
):
# input z: the random noise
# input z: the random noise
# input y: input data label (optional)
# input y: input data label (optional)
# output G_im: generated fake images
# output G_im: generated fake images
...
@@ -116,7 +117,8 @@ def generator(self, z, y = None):
...
@@ -116,7 +117,8 @@ def generator(self, z, y = None):
-
Given a noisy input z, returns a fake image.
-
Given a noisy input z, returns a fake image.
-
Concatenation, Convolution, batch-norm, FC, Leaky-ReLU operations required;
-
Concatenation, Convolution, batch-norm, FC, Leaky-ReLU operations required;
```
python
```
python
def
discriminator
(
self
,
image
):
class
DCGAN
(
object
):
def
discriminator
(
self
,
image
):
# input image: either generated images or real ones
# input image: either generated images or real ones
# output D_h2: binary logit of the label
# output D_h2: binary logit of the label
...
@@ -137,8 +139,8 @@ def discriminator(self, image):
...
@@ -137,8 +139,8 @@ def discriminator(self, image):
-
Build generator and discriminators;
-
Build generator and discriminators;
-
Define two training losses for discriminator and generator, respectively.
-
Define two training losses for discriminator and generator, respectively.
```
python
```
python
def
build_model
(
self
):
class
DCGAN
(
object
):
def
build_model
(
self
):
# input data
# input data
if
self
.
y_dim
:
if
self
.
y_dim
:
self
.
y
=
pd
.
data
(
pd
.
float32
,
[
self
.
batch_size
,
self
.
y_dim
])
self
.
y
=
pd
.
data
(
pd
.
float32
,
[
self
.
batch_size
,
self
.
y_dim
])
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录