Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom BatchIterator #1

Open
ProgRoman opened this issue Apr 11, 2016 · 0 comments
Open

Custom BatchIterator #1

ProgRoman opened this issue Apr 11, 2016 · 0 comments

Comments

@ProgRoman
Copy link

Hello! When using this code


from nolearn.lasagne import BatchIterator
class SimpleBatchIterator(BatchIterator):
    def transform(self, Xb, yb):
        # The 'incomming' and outcomming shape is (10, 1, 28, 28)
        Xb, yb = super(SimpleBatchIterator, self).transform(Xb, yb)
        return manipulateTrainingData(Xb), yb #<--- Here we do the manipulations of the training set
# Setting the new batch iterator
net1Aug = createNet()
net1Aug.max_epochs = epochs_augmentation
net1Aug.batch_iterator_train = SimpleBatchIterator(256)

The original image is completely replaced by the new image after a call to the method
transform(self, Xb, yb)
ie training sets extends (adding new modified image)
or training set remains the same size replaced only the images themselves?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant