Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
05f4362e
Commit
05f4362e
authored
Jul 09, 2018
by
MORITA Kazutaka
Committed by
Tianqi Chen
Jul 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NNVM][Keras] allow only tensorflow backend (#1392)
parent
0c506f9a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
nnvm/python/nnvm/frontend/keras.py
+2
-0
nnvm/tests/python/frontend/keras/test_forward.py
+3
-0
No files found.
nnvm/python/nnvm/frontend/keras.py
View file @
05f4362e
...
...
@@ -489,6 +489,8 @@ def from_keras(model):
raise
ImportError
(
'Keras must be installed'
)
assert
isinstance
(
model
,
keras
.
engine
.
training
.
Model
)
if
keras
.
backend
.
backend
()
!=
'tensorflow'
:
raise
ValueError
(
"Keras frontend currently supports tensorflow backend only."
)
if
keras
.
backend
.
image_data_format
()
!=
'channels_last'
:
raise
ValueError
(
"Keras frontend currently supports data_format = channels_last only."
)
_check_unsupported_layers
(
model
)
...
...
nnvm/tests/python/frontend/keras/test_forward.py
View file @
05f4362e
...
...
@@ -14,6 +14,9 @@ set_session(tf.Session(config=config))
def
verify_keras_frontend
(
keras_model
):
# Keras frontend currently supports tensorflow backend only.
assert
(
keras
.
backend
.
backend
()
==
'tensorflow'
)
in_shapes
=
[]
for
layer
in
keras_model
.
_input_layers
:
in_shapes
.
append
(
tuple
(
dim
.
value
if
dim
.
value
is
not
None
else
1
for
dim
in
layer
.
input
.
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