Commit 1d658f4f authored by vishnubanna's avatar vishnubanna
Browse files

pr comment to explain decoder

parent a800e9b1
......@@ -9,6 +9,8 @@ task:
type: 'darknet'
darknet:
model_id: 'darknet53'
norm_activation:
activation: 'mish'
losses:
l2_weight_decay: 0.0005
one_hot: True
......
......@@ -11,6 +11,8 @@ task:
type: 'darknet'
darknet:
model_id: 'darknet53'
norm_activation:
activation: 'mish'
losses:
l2_weight_decay: 0.0005
one_hot: True
......
......@@ -27,6 +27,9 @@ class Decoder(decoder.Decoder):
return
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 = {
'image/encoded': tf.io.encode_jpeg(serialized_example['image'], quality=100),
'image/class/label': serialized_example['label'],
......
......@@ -6,7 +6,6 @@ import tensorflow.keras.backend as K
from official.modeling import tf_utils
@ks.utils.register_keras_serializable(package='yolo')
class Identity(ks.layers.Layer):
def __init__(self, **kwargs):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment