# Path: tf_slim/data/data_decoder.py
# class DataDecoder(object):
#   def decode(self, data, items):
#   def list_items(self):


import abc
import six
from tf_slim.data import data_decoder
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import sparse_tensor
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import check_ops
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import image_ops
from tensorflow.python.ops import map_fn
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import parsing_ops
from tensorflow.python.ops import sparse_ops
    self._default_value = default_value
    super(KeypointsSequence, self).__init__(self._full_keys)

  def tensors_to_item(self, keys_to_tensors):
    """Maps the given dictionary of tensors to a concatenated list of keypoints.

    Args:
      keys_to_tensors: a mapping of TF-Example keys to parsed tensors.

    Returns:
      [time, num_keypoints, 2] tensor of keypoint coordinates, in order [y, x].
          Whether the tensor is a SparseTensor or a dense Tensor is determined
          by the return_dense parameter. Empty positions in the sparse tensor
          are filled with -1.0 values.
    """
    coordinates = []
    for key in self._full_keys:
      value = keys_to_tensors[key]
      expanded_dims = array_ops.concat(
          [math_ops.to_int64(array_ops.shape(value)),
           constant_op.constant([1], dtype=dtypes.int64)], 0)
      coordinate = sparse_ops.sparse_reshape(value, expanded_dims)
      coordinates.append(coordinate)
    keypoints = sparse_ops.sparse_concat(2, coordinates)
    if self._return_dense:
      keypoints = sparse_ops.sparse_tensor_to_dense(
          keypoints, default_value=self._default_value)
    return keypoints



# Path: tf_slim/data/data_decoder.py
# class DataDecoder(object):
#   def decode(self, data, items):
#   def list_items(self):


# Path: tf_slim/data/tfexample_decoder.py
import abc
import six
from tf_slim.data import data_decoder
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.framework import sparse_tensor
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import check_ops
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import image_ops
from tensorflow.python.ops import map_fn
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import parsing_ops
from tensorflow.python.ops import sparse_ops

    self._default_value = default_value
    super(KeypointsSequence, self).__init__(self._full_keys)

  def tensors_to_item(self, keys_to_tensors):
    """Maps the given dictionary of tensors to a concatenated list of keypoints.

    Args:
      keys_to_tensors: a mapping of TF-Example keys to parsed tensors.

    Returns:
      [time, num_keypoints, 2] tensor of keypoint coordinates, in order [y, x].
          Whether the tensor is a SparseTensor or a dense Tensor is determined
          by the return_dense parameter. Empty positions in the sparse tensor
          are filled with -1.0 values.
    """
    coordinates = []
    for key in self._full_keys:
      value = keys_to_tensors[key]
      expanded_dims = array_ops.concat(
          [math_ops.to_int64(array_ops.shape(value)),
           constant_op.constant([1], dtype=dtypes.int64)], 0)
      coordinate = sparse_ops.sparse_reshape(value, expanded_dims)
      coordinates.append(coordinate)
    keypoints = sparse_ops.sparse_concat(2, coordinates)
    if self._return_dense:
      keypoints = sparse_ops.sparse_tensor_to_dense(
          keypoints, default_value=self._default_value)
    return keypoints



class TFExampleDecoder(data_decoder.DataDecoder):