提交 a6c53fc2 编写于 作者: W wanghaoshuang

fix python wrapper bugs

上级 e23acb4e
......@@ -3187,8 +3187,8 @@ class SwitchOrderLayer(LayerBase):
def __init__(self, name, inputs, reshape, **xargs):
super(SwitchOrderLayer, self).__init__(
name, 'switch_order', 0, inputs=inputs, **xargs)
self.conf.reshape_conf.heightAxis_ = reshape['height']
self.conf.reshape_conf.widthAxis_ = reshape['width']
self.config.reshape_conf.heightAxis.extend(reshape['height'])
self.config.reshape_conf.widthAxis.extend(reshape['width'])
# Deprecated, use a new layer specific class instead
......
......@@ -5976,7 +5976,11 @@ def gated_unit_layer(input,
@layer_support()
@wrap_name_default('switch_order')
def switch_order_layer(input, name=None, reshape=None, layer_attr=None):
def switch_order_layer(input,
name=None,
reshape=None,
act=None,
layer_attr=None):
"""
This layer switch dimension order of image input.
From order "batchSize, channels, height, width"
......@@ -6000,9 +6004,10 @@ def switch_order_layer(input, name=None, reshape=None, layer_attr=None):
assert isinstance(input, LayerOutput)
l = Layer(
name=name,
inputs=input,
inputs=input.name,
reshape=reshape,
type=LayerType.SWITCH_ORDER_LAYER,
active_type=act.name,
**ExtraLayerAttribute.to_kwargs(layer_attr))
return LayerOutput(
name=name,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册