提交 bd8613ac 编写于 作者: W wangyang59

changed initialization method for demo/gan

上级 70b78b74
...@@ -117,10 +117,12 @@ def generator(noise): ...@@ -117,10 +117,12 @@ def generator(noise):
""" """
generator generates a sample given noise generator generates a sample given noise
""" """
param_attr = ParamAttr(is_static=is_discriminator_training) param_attr = ParamAttr(is_static=is_discriminator_training,
initial_mean=0.0,
initial_std=0.02)
bias_attr = ParamAttr(is_static=is_discriminator_training, bias_attr = ParamAttr(is_static=is_discriminator_training,
initial_mean=1.0, initial_mean=0.0,
initial_std=0) initial_std=0.0)
param_attr_bn=ParamAttr(is_static=is_discriminator_training, param_attr_bn=ParamAttr(is_static=is_discriminator_training,
initial_mean=1.0, initial_mean=1.0,
......
...@@ -197,7 +197,7 @@ def main(): ...@@ -197,7 +197,7 @@ def main():
curr_train = "dis" curr_train = "dis"
curr_strike = 0 curr_strike = 0
MAX_strike = 100 MAX_strike = 10
for train_pass in xrange(100): for train_pass in xrange(100):
dis_trainer.startTrainPass() dis_trainer.startTrainPass()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册