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
1d658f4f
Commit
1d658f4f
authored
Nov 07, 2020
by
vishnubanna
Browse files
pr comment to explain decoder
parent
a800e9b1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
1 deletion
+7
-1
official/vision/beta/projects/yolo/configs/experiments/darknet53.yaml
...ion/beta/projects/yolo/configs/experiments/darknet53.yaml
+2
-0
official/vision/beta/projects/yolo/configs/experiments/darknet53_tfds.yaml
...eta/projects/yolo/configs/experiments/darknet53_tfds.yaml
+2
-0
official/vision/beta/projects/yolo/dataloaders/classification_input.py
...on/beta/projects/yolo/dataloaders/classification_input.py
+3
-0
official/vision/beta/projects/yolo/modeling/layers/nn_blocks.py
...al/vision/beta/projects/yolo/modeling/layers/nn_blocks.py
+0
-1
No files found.
official/vision/beta/projects/yolo/configs/experiments/darknet53.yaml
View file @
1d658f4f
...
@@ -9,6 +9,8 @@ task:
...
@@ -9,6 +9,8 @@ task:
type
:
'
darknet'
type
:
'
darknet'
darknet
:
darknet
:
model_id
:
'
darknet53'
model_id
:
'
darknet53'
norm_activation
:
activation
:
'
mish'
losses
:
losses
:
l2_weight_decay
:
0.0005
l2_weight_decay
:
0.0005
one_hot
:
True
one_hot
:
True
...
...
official/vision/beta/projects/yolo/configs/experiments/darknet53_tfds.yaml
View file @
1d658f4f
...
@@ -11,6 +11,8 @@ task:
...
@@ -11,6 +11,8 @@ task:
type
:
'
darknet'
type
:
'
darknet'
darknet
:
darknet
:
model_id
:
'
darknet53'
model_id
:
'
darknet53'
norm_activation
:
activation
:
'
mish'
losses
:
losses
:
l2_weight_decay
:
0.0005
l2_weight_decay
:
0.0005
one_hot
:
True
one_hot
:
True
...
...
official/vision/beta/projects/yolo/dataloaders/classification_input.py
View file @
1d658f4f
...
@@ -27,6 +27,9 @@ class Decoder(decoder.Decoder):
...
@@ -27,6 +27,9 @@ class Decoder(decoder.Decoder):
return
return
def
decode
(
self
,
serialized_example
):
def
decode
(
self
,
serialized_example
):
# this is not the best solution, but we encode the image because the parser only works with string encoded jpegs.
# the simple solution is to decode the image to a tensor in the deccoder and to have the parser operate on uint8
# tensors rather than tensor strings, or to have the parser function differently based on the input type.
sample_dict
=
{
sample_dict
=
{
'image/encoded'
:
tf
.
io
.
encode_jpeg
(
serialized_example
[
'image'
],
quality
=
100
),
'image/encoded'
:
tf
.
io
.
encode_jpeg
(
serialized_example
[
'image'
],
quality
=
100
),
'image/class/label'
:
serialized_example
[
'label'
],
'image/class/label'
:
serialized_example
[
'label'
],
...
...
official/vision/beta/projects/yolo/modeling/layers/nn_blocks.py
View file @
1d658f4f
...
@@ -6,7 +6,6 @@ import tensorflow.keras.backend as K
...
@@ -6,7 +6,6 @@ import tensorflow.keras.backend as K
from
official.modeling
import
tf_utils
from
official.modeling
import
tf_utils
@
ks
.
utils
.
register_keras_serializable
(
package
=
'yolo'
)
@
ks
.
utils
.
register_keras_serializable
(
package
=
'yolo'
)
class
Identity
(
ks
.
layers
.
Layer
):
class
Identity
(
ks
.
layers
.
Layer
):
def
__init__
(
self
,
**
kwargs
):
def
__init__
(
self
,
**
kwargs
):
...
...
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