FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
docker-python/tests/test_tensorflow_addons.py at master · ArasAzimi/docker-python · GitHub
ArasAzimi
/
docker-python
Public
forked from
Kaggle/docker-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
docker-python
/
tests
/
test_tensorflow_addons.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (16 loc) · 656 Bytes
Breadcrumbs
docker-python
/
tests
/
test_tensorflow_addons.py
Copy path
File metadata and controls
22 lines (16 loc) · 656 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import
unittest
import
tensorflow
as
tf
import
tensorflow_addons
as
tfa
class
TestTensorflowAddons
(
unittest
.
TestCase
):
def
test_tfa_image
(
self
):
img_raw
=
tf
.
io
.
read_file
(
'/input/tests/data/dot.png'
)
img
=
tf
.
io
.
decode_image
(
img_raw
)
img
=
tf
.
image
.
convert_image_dtype
(
img
,
tf
.
float32
)
mean
=
tfa
.
image
.
mean_filter2d
(
img
,
filter_shape
=
1
)
self
.
assertEqual
(
1
,
len
(
mean
))
# This test exercises TFA Custom Op. See: b/145555176
def
test_gelu
(
self
):
x
=
tf
.
constant
([[
0.5
,
1.2
,
-
0.3
]])
layer
=
tfa
.
layers
.
GELU
()
result
=
layer
(
x
)
self
.
assertEqual
((
1
,
3
),
result
.
shape
)
Back
|
FazBrowse Home
|
New Git URL