Refactor data_transform to allow datum, cv:Mat and Blob transformation

Move data_mean into the data_transform class to facilitate data transformation. 
This way Data layers don't need to hold it and pass it all the time. 

But then, that case was failing before this PR too, isn't it?

Sergio

2014-09-25 10:13 GMT-07:00 Evan Shelhamer <notifications@github.com>:

> In include/caffe/data_transformer.hpp:
>
> >     * @param datum
> >     *    Datum containing the data to be transformed.
> > -   * @param mean
> > +   * @param datum_vector
>
> @sguada <https://github.com/sguada> I think it has something to do with
> what's included where though. There can be cv::Mat in the code, but only
> when compiled for CPU by g++ / clang++ and not when compiled by NVCC for
> GPU.
> … <#148adcde20679572_>
> On Thu, Sep 25, 2014 at 10:07 AM, Sergio Guadarrama <
> notifications@github.com> wrote: > In include/caffe/data_transformer.hpp:
> > > > * @param <https://github.com/param> datum > > * Datum containing
> the data to be transformed. > > - * @param <https://github.com/param>
> mean > > + * @param <https://github.com/param> datum_vector > > Then I'm
> really confused, because before we were also using opencv::Mat > and it was
> working, isn't it? Sergio 2014-09-25 10:04 GMT-07:00 Evan > Shelhamer <
> notifications@github.com>: > … <#148adc848d3ad841_> > In
> include/caffe/data_transformer.hpp: > * @param <https://github.com/param>
> > <https://github.com/param> datum > * Datum containing the data to be >
> transformed. > - * @param <https://github.com/param> <
> https://github.com/param> mean > + * @param <https://github.com/param> > <
> https://github.com/param> datum_vector Looking over the crash it looks >
> like NVCC just hates OpenCV's mat.hpp. … <#148adc5bc6bc9de0_> On Thursday,
> > September 25, 2014, Sergio Guadarrama < notifications@github.com>
> wrote: In include/caffe/data_transformer.hpp: > * @param
> <https://github.com/param> <https://github.com/param> <
> https://github.com/param> datum > * Datum containing the data to be
> transformed. > - * @param <https://github.com/param> <
> https://github.com/param> <https://github.com/param> mean > + * @param
> <https://github.com/param> <https://github.com/param> <
> https://github.com/param> datum_vector Sure I will replicate the
> definition for each case — Reply to this email directly or view it on
> GitHub < https://github.com/BVLC/caffe/pull/1070/files#r18044767>. —
> Reply to this email directly or view it on GitHub <
> https://github.com/BVLC/caffe/pull/1070/files#r18044855>. — Reply to this
> email directly or view it on GitHub <
> https://github.com/BVLC/caffe/pull/1070/files#r18045025>.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/BVLC/caffe/pull/1070/files#r18045424>.
>