Skip to content

Conversation

warshallrho
Copy link
Member

@warshallrho warshallrho commented May 25, 2019

Checklist

  • I've tested that my changes are compatible with the latest version of Tensorflow.
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

Description

Please review.

@warshallrho warshallrho changed the title [WIP] change network config format [WIP] change network config format, and update layer act May 25, 2019
_act_dict = {
"relu": tf.nn.relu,
"relu6": tf.nn.relu6,
"leaky_relu": tf.nn.leaky_relu,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when act = 'lrelu0.2' or 'leaky_relu0.2' act = lambda x : tf.nn.leaky_relu(x, 0.2'

_global_layer_name_dict[name] = 0

self.name = name
if haveact:
Copy link
Member

@zsdonghao zsdonghao May 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if isfun(act): self.act = act elif act == None: self.act = lambda x: x elif instance(act, str): self.act = str2act(act) else: raise Exception("unsupported act {}".format(act)) 
"relu": tf.nn.relu,
"relu6": tf.nn.relu6,
"leaky_relu": tf.nn.leaky_relu,
"lrelu0.2": tf.nn.leaky_relu,
Copy link
Member

@zsdonghao zsdonghao May 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is incorrect .. need to parse the number from lrelu222.222, lambda x : tf.nn.leaky_relu(x, 222.222)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zsdonghao fixed

@warshallrho warshallrho requested a review from zsdonghao May 29, 2019 12:10
@zsdonghao zsdonghao changed the title [WIP] change network config format, and update layer act change network config format, and update layer act Jun 2, 2019
@zsdonghao zsdonghao merged commit 299046e into tensorlayer:master Jun 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants