NORB bugfix

Fixed a bug in NORB that was only visible when the NORB object was given memmaps instantiated with mode='w+' as its .X or .y fields.

When pickling NORB files, its __getstate__ would replace .X and .y with argument lists for instantiating the memmap files, used to load the memmaps when unpickling. The bug was that these argument lists contained `mode='w+'` if the memmap was originally created with `mode='w+'`. When unpickling, this mode was used, causing the memmap to be overwritten. This bug is now fixed (repaced 'w+' with 'r+').

Also, there was a risk that, after pickling a NORB object, a user could still edit its memmaps, causing changes to the "saved" data. To prevent this, when a NORB is pickled, it now automatically switches its memmaps to be read-only. The user must now explicitly switch the memmaps back to read-write if they want to.
Whoops; didn't mean to include that in this branch. I keep my own
norb-based work in a separate branch but some files mistakenly got copied
over.

Will remove.

On Thu, Oct 2, 2014 at 7:02 PM, Ian Goodfellow <notifications@github.com>
wrote:

> In pylearn2/scripts/papers/maxout/norb/norb.yaml:
>
> > @@ -0,0 +1,156 @@
> > +# Useful tips for setting these params:
>
> The scripts/papers/maxout directory is specifically for the ICML 2013
> paper. While I'm glad that you're contributing new results with maxout we
> should probably put them in a different place, so that we don't imply that
> there were NORB results with maxout in Feb 2013. Maybe
> scripts/tutorials/maxout? Or if you have a new paper out, a new directory
> in scripts/papers?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/lisa-lab/pylearn2/pull/1091/files#r18356078>.
>