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

Trainer2 #1285

Merged
merged 250 commits into from Jul 11, 2016
Merged

Trainer2 #1285

merged 250 commits into from Jul 11, 2016

Conversation

beam2d
Copy link
Member

@beam2d beam2d commented Jun 16, 2016

fix #914. I wrote an updated version of the training loop abstraction. This includes many improvements based on the feedback to the old version (#958). For example,

  • Design around the dataset abstraction is improved. Most considerable applications are supported with some efforts of customization.
  • New Trainer supports using multiple datasets and multiple optimizers.
  • Evaluation report is abstracted into Reporter object. This makes it easy to collect many observable values like loss/accuracy, activation statistics, etc.

I have not updated the tutorial document yet, which should be done before merging it.

also useful when the order of examples is important and should not be
broken.

Args:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a "shuffle" (bool) argument, with default value False. If set to True, it takes on the same behavior as ShuffledIterator. There seems to be quite a bit of code duplication between these two classes. If this change is implemented, ShuffledIterator could then be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, I agree with you. I updated the code and merge these iterators into SerialIterator.

@delta2323
Copy link
Member

@beam2d I checked ExponentialShift. It seems OK.


Chainer provides some iterators that implement typical strategies to create minibatches by iterating over datasets.
:class:`SerialIterator` is the simplest one, which extract mini batches in the main thread.
:class:`MultiprocessIterator` is a parallelized version of :class:`ShuffledIterator`. It maintains worker subprocesses to load the next mini batch in parallel.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ShuffledIterator does no longer exist.

@delta2323
Copy link
Member

LGTM 👍

@delta2323 delta2323 merged commit 26b380d into master Jul 11, 2016
@beam2d beam2d added this to the v1.11.0 milestone Jul 12, 2016
@beam2d beam2d deleted the trainer2 branch July 25, 2016 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:feature Implementation that introduces new interfaces.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it easy to write a training code
6 participants