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
7112dd78
Commit
7112dd78
authored
Jan 15, 2018
by
thefiddler
Committed by
Tianqi Chen
May 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid crash when linear activation does not have alpha and beta defined (#306)
parent
292609d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
nnvm/python/nnvm/frontend/keras.py
+3
-1
No files found.
nnvm/python/nnvm/frontend/keras.py
View file @
7112dd78
...
...
@@ -27,8 +27,10 @@ def _convert_activation(insym, keras_layer, _):
if
act_type
==
'linear'
:
if
isinstance
(
keras_layer
,
str
):
return
insym
alpha
=
keras_layer
.
alpha
if
hasattr
(
keras_layer
,
"alpha"
)
else
1
beta
=
keras_layer
.
beta
if
hasattr
(
keras_layer
,
"beta"
)
else
0
return
_sym
.
__add_scalar__
(
_sym
.
__mul_scalar__
(
insym
,
\
scalar
=
keras_layer
.
alpha
),
scalar
=
keras_layer
.
beta
)
scalar
=
alpha
),
scalar
=
beta
)
elif
act_type
==
'softmax'
:
return
_sym
.
softmax
(
insym
)
elif
act_type
==
'sigmoid'
:
...
...
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