get the DepthToSpace and SpaceToDepth operator from onnx node Args: onnx_node (OnnxNode): a given onnx node operator (Operator Class): a singa operator class opset_version (int): the opset version Returns: singa operator insta
(cls, onnx_node, operator, opset_version=_opset_version)
| 1171 | |
| 1172 | @classmethod |
| 1173 | def _create_depth_space(cls, onnx_node, operator, opset_version=_opset_version): |
| 1174 | """ |
| 1175 | get the DepthToSpace and SpaceToDepth operator from onnx node |
| 1176 | Args: |
| 1177 | onnx_node (OnnxNode): a given onnx node |
| 1178 | operator (Operator Class): a singa operator class |
| 1179 | opset_version (int): the opset version |
| 1180 | Returns: |
| 1181 | singa operator instance |
| 1182 | """ |
| 1183 | blocksize = onnx_node.getattr("blocksize") |
| 1184 | mode = utils.force_unicode(onnx_node.getattr("mode", "DCR")) |
| 1185 | return operator(blocksize, mode) |
| 1186 | |
| 1187 | @classmethod |
| 1188 | def _create_where(cls, onnx_node, operator, opset_version=_opset_version): |