提交 52be2a2a 编写于 作者: W wanghaoshuang

Add depth dim

上级 ce4e0e90
...@@ -3865,9 +3865,18 @@ class SwitchOrderLayer(LayerBase): ...@@ -3865,9 +3865,18 @@ class SwitchOrderLayer(LayerBase):
else: else:
inH = input_layer.height inH = input_layer.height
inW = input_layer.width inW = input_layer.width
inC = input_layer.size / inH / inW if input_layer.has_depth():
out_dims = [0, inH, inW, inC] inD = input_layer.depth
size = reduce(lambda x, y: x * y, out_dims[reshape['width'][0]:]) inC = input_layer.size / inH / inW / inD
out_dims = [0, inD, inH, inW, inC]
size = reduce(lambda x, y: x * y,
out_dims[reshape['width'][0]:])
else:
inC = input_layer.size / inH / inW
out_dims = [0, inH, inW, inC]
size = reduce(lambda x, y: x * y,
out_dims[reshape['width'][0]:])
self.set_layer_size(size) self.set_layer_size(size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册