-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add a new layer ElementwiseLambdaLayer #579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an entry in the Changelog following the existing formating and syntax.
| self, | ||
| layers, | ||
| fn, | ||
| fn_args=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add parameter
- act=None
| fn_args = {} | ||
|
|
||
| self.inputs = [layer.outputs for layer in layers] | ||
| with tf.variable_scope(name) as vs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a linebreak before the new scope
|
|
||
| self.inputs = [layer.outputs for layer in layers] | ||
| with tf.variable_scope(name) as vs: | ||
| self.outputs = fn(*self.inputs, **fn_args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.outputs = fn(*self.inputs, **fn_args)
if act:
self.outputs = act(self.outputs)Update CHANGELOG.md
|
I have finished modifying it. |
CHANGELOG.md
Outdated
| - CI Tool: | ||
| - Danger CI has been added to enforce the update of the changelog (by @lgarithm and @DEKHTIARJonathan in #563) | ||
| - https://github.com/apps/stale/ added to clean stale issues (by @DEKHTIARJonathan in #573) | ||
| - API: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change for Layer
CHANGELOG.md
Outdated
| - Danger CI has been added to enforce the update of the changelog (by @lgarithm and @DEKHTIARJonathan in #563) | ||
| - https://github.com/apps/stale/ added to clean stale issues (by @DEKHTIARJonathan in #573) | ||
| - API: | ||
| - Add new layer ElementwiseLambdaLayer (by @One-sixth in #576) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect PR number => #579
Please avoid using 'add of blablabla'. We already know you added something thanks to the Changelog Section.
Make smthg like this:
ElementwiseLambdaLayerto perform ????????????????? (by @One-sixth in Add a new layer ElementwiseLambdaLayer #579)
tensorlayer/layers/merge.py
Outdated
|
|
||
|
|
||
| class ElementwiseLambdaLayer(Layer): | ||
| """A layer uses a custom function to join multiple layer inputs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
English Syntax: A layer that use a custom function to combine multiple :class:Layer inputs.
| The function that applies to the outputs of previous layer. | ||
| fn_args : dictionary or None | ||
| The arguments for the function (option). | ||
| name : str |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing:
act : activation function
The activation function of this layer.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please modify the comments.
Other changes need to be made, however let's proceed step by step
|
Have any other problems? |
|
@One-sixth I was first focusing on the "cosmetic" aspects. Now I see two major issues before merging:
|
CHANGELOG.md
Outdated
| - Danger CI has been added to enforce the update of the changelog (by @lgarithm and @DEKHTIARJonathan in #563) | ||
| - https://github.com/apps/stale/ added to clean stale issues (by @DEKHTIARJonathan in #573) | ||
| - Layer: | ||
| - ElementwiseLambdaLayer added to use custom function to connect multiple layer inputs. (by @One-sixth in #579) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "." before "(by @One-sixth in #579)"
|
Error with YAPF, run the following: |
|
@One-sixth congratulation on this PR! I merge immediately :D |
|
Good |
* Add a new layer ElementwiseLambdaLayer * delete assert * fix style * add act parameter, fix style * Update CHANGELOG.md * Update CHANGELOG.md * Update merge.py * Update test_layers_merge.py * Update test_layers_merge.py * Update layers.rst * Update CHANGELOG.md
Checklist
Motivation and Context
Description