Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[MXNET-378] Adding depth_to_space and space_to_depth operator(Updated) #11587

Merged
merged 7 commits into from
Jul 26, 2018
4 changes: 4 additions & 0 deletions docs/api/python/ndarray/ndarray.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ The `ndarray` package provides several classes:
NDArray.transpose
NDArray.swapaxes
NDArray.flip
NDArray.depth_to_space
NDArray.space_to_depth
```

### Array reduction
Expand Down Expand Up @@ -411,6 +413,8 @@ The `ndarray` package provides several classes:
transpose
swapaxes
flip
depth_to_space
space_to_depth
```

### Joining and splitting arrays
Expand Down
4 changes: 4 additions & 0 deletions docs/api/python/symbol/symbol.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ Composite multiple symbols into a new one by an operator.
Symbol.transpose
Symbol.swapaxes
Symbol.flip
Symbol.depth_to_space
Symbol.space_to_depth
```

### Reduce functions
Expand Down Expand Up @@ -409,6 +411,8 @@ Composite multiple symbols into a new one by an operator.
transpose
swapaxes
flip
depth_to_space
space_to_depth
```

### Joining and splitting symbols
Expand Down
16 changes: 16 additions & 0 deletions python/mxnet/ndarray/ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,22 @@ def flip(self, *args, **kwargs):
"""
return op.flip(self, *args, **kwargs)

def depth_to_space(self, *args, **kwargs):
"""Convenience fluent method for :py:func:`depth_to_space`.

The arguments are the same as for :py:func:`depth_to_space`, with
this array as data.
"""
return op.depth_to_space(self, *args, **kwargs)

def space_to_depth(self, *args, **kwargs):
"""Convenience fluent method for :py:func:`space_to_depth`.

The arguments are the same as for :py:func:`space_to_depth`, with
this array as data.
"""
return op.space_to_depth(self, *args, **kwargs)

def diag(self, k=0, **kwargs):
"""Convenience fluent method for :py:func:`diag`.

Expand Down
16 changes: 16 additions & 0 deletions python/mxnet/symbol/symbol.py
Original file line number Diff line number Diff line change
Expand Up @@ -2046,6 +2046,22 @@ def flip(self, *args, **kwargs):
"""
return op.flip(self, *args, **kwargs)

def depth_to_space(self, *args, **kwargs):
"""Convenience fluent method for :py:func:`depth_to_space`.

The arguments are the same as for :py:func:`depth_to_space`, with
this array as data.
"""
return op.depth_to_space(self, *args, **kwargs)

def space_to_depth(self, *args, **kwargs):
"""Convenience fluent method for :py:func:`space_to_depth`.

The arguments are the same as for :py:func:`space_to_depth`, with
this array as data.
"""
return op.space_to_depth(self, *args, **kwargs)

def diag(self, k=0, **kwargs):
"""Convenience fluent method for :py:func:`diag`.

Expand Down
Loading