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
e3fc61e7
Commit
e3fc61e7
authored
Jun 14, 2022
by
SunJong Park
Browse files
Minor bug fixed with yt8m_input_test while refactoring name, Changed class names
parent
83ae348b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
official/projects/yt8m/dataloaders/yt8m_input_test.py
official/projects/yt8m/dataloaders/yt8m_input_test.py
+2
-2
official/projects/yt8m/modeling/nn_layers.py
official/projects/yt8m/modeling/nn_layers.py
+2
-2
No files found.
official/projects/yt8m/dataloaders/yt8m_input_test.py
View file @
e3fc61e7
...
...
@@ -37,7 +37,7 @@ class Yt8mInputTest(parameterized.TestCase, tf.test.TestCase):
tf
.
io
.
gfile
.
makedirs
(
data_dir
)
self
.
data_path
=
os
.
path
.
join
(
data_dir
,
'data.tfrecord'
)
self
.
num_segment
=
6
examples
=
[
utils
.
M
ake
Y
t8m
E
xample
(
self
.
num_segment
)
for
_
in
range
(
8
)]
examples
=
[
utils
.
m
ake
_y
t8m
_e
xample
(
self
.
num_segment
)
for
_
in
range
(
8
)]
tfexample_utils
.
dump_to_tfrecord
(
self
.
data_path
,
tf_examples
=
examples
)
def
create_input_reader
(
self
,
params
):
...
...
@@ -130,7 +130,7 @@ class Yt8mInputTest(parameterized.TestCase, tf.test.TestCase):
tf
.
io
.
gfile
.
makedirs
(
data_dir
)
data_path
=
os
.
path
.
join
(
data_dir
,
'data2.tfrecord'
)
examples
=
[
utils
.
M
ake
E
xample
W
ith
F
loat
F
eatures
(
self
.
num_segment
)
for
_
in
range
(
8
)
utils
.
m
ake
_e
xample
_w
ith
_f
loat
_f
eatures
(
self
.
num_segment
)
for
_
in
range
(
8
)
]
tfexample_utils
.
dump_to_tfrecord
(
data_path
,
tf_examples
=
examples
)
...
...
official/projects/yt8m/modeling/
yt8m_agg_model
s.py
→
official/projects/yt8m/modeling/
nn_layer
s.py
View file @
e3fc61e7
...
...
@@ -21,7 +21,7 @@ from official.projects.yt8m.modeling import yt8m_model_utils as utils
layers
=
tf
.
keras
.
layers
class
Logistic
Model
():
class
Logistic
():
"""Logistic model with L2 regularization."""
def
create_model
(
self
,
model_input
,
vocab_size
,
l2_penalty
=
1e-8
):
...
...
@@ -45,7 +45,7 @@ class LogisticModel():
return
{
"predictions"
:
output
}
class
Moe
Model
():
class
Moe
():
"""A softmax over a mixture of logistic models (with L2 regularization)."""
def
create_model
(
self
,
...
...
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