Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
8d0c7942
"git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "8a41b244e8c65fe9b5a63e72370571a6494960b8"
Commit
8d0c7942
authored
Jun 03, 2021
by
A. Unique TensorFlower
Browse files
Internal change
PiperOrigin-RevId: 377422408
parent
297a4bbc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
official/modeling/activations/sigmoid.py
official/modeling/activations/sigmoid.py
+1
-1
official/modeling/activations/swish.py
official/modeling/activations/swish.py
+2
-1
No files found.
official/modeling/activations/sigmoid.py
View file @
8d0c7942
...
@@ -28,4 +28,4 @@ def hard_sigmoid(features):
...
@@ -28,4 +28,4 @@ def hard_sigmoid(features):
The activation value.
The activation value.
"""
"""
features
=
tf
.
convert_to_tensor
(
features
)
features
=
tf
.
convert_to_tensor
(
features
)
return
tf
.
nn
.
relu6
(
features
+
tf
.
c
onstant
(
3.
))
*
0.16667
return
tf
.
nn
.
relu6
(
features
+
tf
.
c
ast
(
3.
,
features
.
dtype
))
*
0.16667
official/modeling/activations/swish.py
View file @
8d0c7942
...
@@ -52,7 +52,8 @@ def hard_swish(features):
...
@@ -52,7 +52,8 @@ def hard_swish(features):
The activation value.
The activation value.
"""
"""
features
=
tf
.
convert_to_tensor
(
features
)
features
=
tf
.
convert_to_tensor
(
features
)
return
features
*
tf
.
nn
.
relu6
(
features
+
tf
.
constant
(
3.
))
*
(
1.
/
6.
)
fdtype
=
features
.
dtype
return
features
*
tf
.
nn
.
relu6
(
features
+
tf
.
cast
(
3.
,
fdtype
))
*
(
1.
/
6.
)
@
tf
.
keras
.
utils
.
register_keras_serializable
(
package
=
'Text'
)
@
tf
.
keras
.
utils
.
register_keras_serializable
(
package
=
'Text'
)
...
...
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