change network config format, and update layer act#980
Merged
zsdonghao merged 27 commits intotensorlayer:masterfrom Jun 2, 2019
Merged
change network config format, and update layer act#980zsdonghao merged 27 commits intotensorlayer:masterfrom
zsdonghao merged 27 commits intotensorlayer:masterfrom
Conversation
zsdonghao
reviewed
May 25, 2019
| _act_dict = { | ||
| "relu": tf.nn.relu, | ||
| "relu6": tf.nn.relu6, | ||
| "leaky_relu": tf.nn.leaky_relu, |
Member
There was a problem hiding this comment.
when act = 'lrelu0.2' or 'leaky_relu0.2' act = lambda x : tf.nn.leaky_relu(x, 0.2'
zsdonghao
reviewed
May 25, 2019
tensorlayer/layers/core.py
Outdated
| _global_layer_name_dict[name] = 0 | ||
|
|
||
| self.name = name | ||
| if haveact: |
Member
There was a problem hiding this comment.
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))
zsdonghao
reviewed
May 29, 2019
tensorlayer/layers/core.py
Outdated
| "relu": tf.nn.relu, | ||
| "relu6": tf.nn.relu6, | ||
| "leaky_relu": tf.nn.leaky_relu, | ||
| "lrelu0.2": tf.nn.leaky_relu, |
Member
There was a problem hiding this comment.
this is incorrect .. need to parse the number from lrelu222.222, lambda x : tf.nn.leaky_relu(x, 222.222)
zsdonghao
approved these changes
Jun 2, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Motivation and Context
Description
Please review.