Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
547f0524
Commit
547f0524
authored
Apr 17, 2018
by
arogowie-intel
Committed by
Robert Kimball
Apr 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ease use of reshape operator. (#873)
- Set default input axes order.
parent
56bd183a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
ops.py
python/ngraph/ops.py
+4
-2
No files found.
python/ngraph/ops.py
View file @
547f0524
...
...
@@ -188,14 +188,16 @@ def ceiling(node, name=None): # type: (NodeInput, str) -> Node
@unary_op
def
reshape
(
node
,
input_order
,
output_shap
e
,
name
=
None
):
# type: (Node, List[int], List[int], str) -> No
n
e
def
reshape
(
node
,
output_shape
,
input_order
=
Non
e
,
name
=
None
):
# type: (Node, List[int], List[int], str) -> No
d
e
"""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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment