# Path: data/helper/record.py
# class Record(object):
#     """Record object holding an example of a dataset."""
# 
#     def __init__(self, data, shape, label):
#         """Creates a record representing an example of a dataset.
# 
#         Args:
#             data: A [height, width, depth] float32 tensor with the data of the
#               record.
#             shape: A TensorShape representing the shape of the data.
#             label: An int64 tensor with the label of the record.
#         """
# 
#         self._data = data
#         self._data.set_shape(shape)
# 
#         self._shape = shape
# 
#         self._label = label
#         self._label.set_shape([1])
# 
#     @property
#     def data(self):
#         """A [height, width, depth] float32 tensor with the data of the record.
#         """
#         return self._data
# 
#     @property
#     def shape(self):
#         """The shape of the data."""
#         return self._shape
# 
#     @property
#     def label(self):
#         """An int64 tensor with the label of the record."""
#         return self._label


import os
import tensorflow as tf
from .record import Record
        data_batch, label_batch = tf.train.batch(
            [record.data, record.label],
            batch_size=batch_size,
            num_threads=NUM_THREADS,
            capacity=capacity,
            allow_smaller_final_batch=False if num_epochs is None else True)

    return data_batch, tf.reshape(label_batch, [-1])


def _resize(record, scale):
    """Resizes the record's data using area interpolation.

    Args:
        record: The record.
        scale: Float defining the scaling to use for resizing.

    Returns:
        A new record object after applying resizing.
    """

    new_height = int(scale * record.shape[0])
    new_width = int(scale * record.shape[1])

    with tf.name_scope('resize', values=[record.data, new_height, new_width]):
        data_batch = tf.expand_dims(record.data, axis=0)
        data_batch = tf.image.resize_area(
            data_batch, [new_height, new_width], align_corners=True)
        data = tf.squeeze(data_batch, axis=[0])


# Path: data/helper/record.py
# class Record(object):
#     """Record object holding an example of a dataset."""
# 
#     def __init__(self, data, shape, label):
#         """Creates a record representing an example of a dataset.
# 
#         Args:
#             data: A [height, width, depth] float32 tensor with the data of the
#               record.
#             shape: A TensorShape representing the shape of the data.
#             label: An int64 tensor with the label of the record.
#         """
# 
#         self._data = data
#         self._data.set_shape(shape)
# 
#         self._shape = shape
# 
#         self._label = label
#         self._label.set_shape([1])
# 
#     @property
#     def data(self):
#         """A [height, width, depth] float32 tensor with the data of the record.
#         """
#         return self._data
# 
#     @property
#     def shape(self):
#         """The shape of the data."""
#         return self._shape
# 
#     @property
#     def label(self):
#         """An int64 tensor with the label of the record."""
#         return self._label


# Path: data/helper/inputs.py
import os
import tensorflow as tf
from .record import Record

        data_batch, label_batch = tf.train.batch(
            [record.data, record.label],
            batch_size=batch_size,
            num_threads=NUM_THREADS,
            capacity=capacity,
            allow_smaller_final_batch=False if num_epochs is None else True)

    return data_batch, tf.reshape(label_batch, [-1])


def _resize(record, scale):
    """Resizes the record's data using area interpolation.

    Args:
        record: The record.
        scale: Float defining the scaling to use for resizing.

    Returns:
        A new record object after applying resizing.
    """

    new_height = int(scale * record.shape[0])
    new_width = int(scale * record.shape[1])

    with tf.name_scope('resize', values=[record.data, new_height, new_width]):
        data_batch = tf.expand_dims(record.data, axis=0)
        data_batch = tf.image.resize_area(
            data_batch, [new_height, new_width], align_corners=True)
        data = tf.squeeze(data_batch, axis=[0])


    return Record(data, [new_height, new_width, record.shape[2]], record.label)