Commit 547f0524 authored by arogowie-intel's avatar arogowie-intel Committed by Robert Kimball

Ease use of reshape operator. (#873)

- Set default input axes order.
parent 56bd183a
......@@ -188,14 +188,16 @@ def ceiling(node, name=None): # type: (NodeInput, str) -> Node
@unary_op
def reshape(node, input_order, output_shape, name=None):
# type: (Node, List[int], List[int], str) -> None
def reshape(node, output_shape, input_order=None, name=None):
# type: (Node, List[int], List[int], str) -> Node
"""Return reshaped node according to provided parameters.
:param node: The tensor we want to reshape.
:param input_order: The order in which to iterate over input axes of input tensor.
:param output_shape: The new shape for input tensor.
"""
if input_order is None:
input_order = list(range(len(node.shape)))
return Reshape(node, AxisVector(input_order), Shape(output_shape))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment