Shortcuts

Source code for nets.data.batch

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


[docs]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