-
Notifications
You must be signed in to change notification settings - Fork 1.6k
update deconv2d function-->class, support dilation #496
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
| A :class:`DeConv2dLayer` object. | ||
| """ | ||
|
|
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 re-add the deprecation header, just above the init function
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.
done
| # return net_new | ||
| else: | ||
| raise Exception("please update TF > 1.3 or downgrade TL < 1.8.4") | ||
| # if batch_size is 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.
You can remove this code if it is not supported anymore.
tensorlayer/layers/convolution.py
Outdated
| self.all_params.extend(new_variables) | ||
| # return net_new | ||
| else: | ||
| raise Exception("please update TF > 1.3 or downgrade TL < 1.8.4") |
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.
Maybe the use of RuntimeError or NotImplementedError would be more appropriate
tests/test_layers_convolution.py
Outdated
| n = tl.layers.DeConv2d(nin, n_filter=32, filter_size=(3, 3), strides=(2, 2), name='DeConv2d') | ||
| print(n) | ||
| shape = n.outputs.get_shape().as_list() | ||
| print(shape[1:]) |
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.
Tests now collide with PR: #494
Please adopt the unittests structure and remove prints from tests before commit.
tensorlayer/layers/convolution.py
Outdated
| """ | ||
|
|
||
| logging.info("DeConv2d %s: n_filters:%s strides:%s pad:%s act:%s" % (name, str(n_filter), str(strides), padding, act.__name__)) | ||
| @deprecated_alias(layer='prev_layer', end_support_version=1.9) # TODO remove this line for the 1.9 release |
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.
This class has a double deprecation, please change for
@deprecated_alias(layer='prev_layer', n_out_channel='n_filter', end_support_version=1.9)
|
@zsdonghao thanks for your corrections, only one small issue left. Once it's corrected I'll merge the PR ;) |
tests/test_layers_convolution.py
Outdated
| print(shape[1:]) | ||
| # if (shape[1] != 200) or (shape[2] != 200) or (shape[3] != 32): # TODO: why [None None None 32] ? | ||
| if (shape[3] != 32): | ||
| if (shape[1:] != [200, 200, 32]): |
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.
You could have kept the tests that you implemented before. Do you need help on this ?
* update deconv2d function-->class, support dilation * fix review comment * fix review comment * fix yapf * fix review commend
No description provided.