Commit a9dce5b2 authored by Yuxin Wu's avatar Yuxin Wu

fix #1053

parent e5e54e07
...@@ -7,7 +7,7 @@ such as conv/deconv, fc, bn, pooling layers. **You do not need to learn them.** ...@@ -7,7 +7,7 @@ such as conv/deconv, fc, bn, pooling layers. **You do not need to learn them.**
These layers were written only because there were no alternatives when These layers were written only because there were no alternatives when
tensorpack was first developed. tensorpack was first developed.
Nowadays, these implementation actually call `tf.layers` directly. Nowadays, these implementation actually call `tf.layers` directly.
Tensorpack will not add any more layers into its core library because this is __Tensorpack will not add any more layers__ into its core library because this is
not the focus of tensorpack, and there are many other alternative symbolic not the focus of tensorpack, and there are many other alternative symbolic
libraries today. libraries today.
......
...@@ -26,6 +26,10 @@ def _register(name, func): ...@@ -26,6 +26,10 @@ def _register(name, func):
raise ValueError(logger.error("A layer cannot be named {}".format(name))) raise ValueError(logger.error("A layer cannot be named {}".format(name)))
_LAYER_REGISTRY[name] = func _LAYER_REGISTRY[name] = func
# handle alias
if name == 'Conv2DTranspose':
_register('Deconv2D', func)
def get_registered_layer(name): def get_registered_layer(name):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment