提交 69b12225 编写于 作者: W wanghaoshuang

fix crop layer python wrapper bug

上级 0b788ef7
...@@ -1988,16 +1988,11 @@ class PadLayer(LayerBase): ...@@ -1988,16 +1988,11 @@ class PadLayer(LayerBase):
@config_layer('crop') @config_layer('crop')
class CropLayer(LayerBase): class CropLayer(LayerBase):
def __init__(self, inputs, axis, offset, shape, name, **xargs): def __init__(self, name, inputs, axis, offset, shape, **xargs):
super(CropLayer, self).__init__(name, 'crop', 0, inputs=inputs, **xargs) super(CropLayer, self).__init__(name, 'crop', 0, inputs=inputs, **xargs)
self.conf.axis = axis self.config.axis = axis
self.conf.axis = offset self.config.offset.extend(offset)
self.conf.axis = shape self.config.shape.extend(shape)
crop = self.inputs[0].crop
self.config.inputs[0].crop_conf.axis = crop.axis
self.config.inputs[0].crop_conf.offset.extend(crop.offset)
self.config.inputs[0].crop_conf.shape.extend(crop.shape)
# get channel, width and height from input_0 layer # get channel, width and height from input_0 layer
input_layer = self.get_input_layer(0) input_layer = self.get_input_layer(0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册