nets.data.batch — nets 0.1 documentation

Table of Contents
Shortcuts

# Source code for nets.data.batch

    """
    A ``Batch`` is a set of examples, usually normalized and scaled for faster predictions.
    """

    class Batch(object):
        """
        A ``Batch``depends on a ``Dataset`` and is made of ``batch_size`` ``Example``.
        """
        def __init__(self, example, batch_size):
            self.example = example
            self.batch_size = batch_size

        def normalize(self):
            raise NotImplementedError

        def __getitem__(self, item):
            return self.example[item]

        def __len__(self):
            return self.batch_size

## Docs

Access comprehensive developer documentation for Nets

View Docs

## Tutorials

Get beginners tutorials and create state-of-the-art models

View Tutorials

## Resources

Check the GitHub page and contribute to the project

View GitHub

To analyze traffic and optimize your experience, we serve cookies on this site. By clicking or navigating, you agree to allow our usage of cookies. As the current maintainers of this site, Facebook’s Cookies Policy applies. Learn more, including about available controls: Cookies Policy.