Update net.cpp
Update net.cpp

Fixed bug raised by @tdomhan in issue #100.
flickr/caffe,intelcaffe/caffe-old,xidianwlc/caffe,gnina/gnina,nicodjimenez/caffe,hotpxl/caffe-m2,xidianwlc/caffe,vibhav-vineet/caffe,gnina/gnina,dculibrk/boosted_pooling,bharath272/sds_eccv2014,jieshen-sjtu/caffe-for-DDNet,tackgeun/caffe,tackgeun/caffe,nicodjimenez/caffe,naeluh/caffe,intelcaffe/caffe-old,shiquanwang/caffe,naeluh/caffe,suixudongi8/caffe,minghuam/caffe,MoskalenkoViktor/caffe,longjon/caffe,longjon/caffe,flickr/caffe,sichenucsd/caffe_si,liuxianming/caffe_feedback,shuimulinxi/caffe,orentadmor/caffe,MoskalenkoViktor/caffe,dylansun/caffe,gogartom/caffe-textmaps,gnina/gnina,dculibrk/boosted_pooling,pcoving/caffe,sichenucsd/caffe_si,liuxianming/caffe_feedback,tackgeun/caffe,shuimulinxi/caffe,yikeliu/caffe-future,minghuam/caffe,shiquanwang/caffe,liuxianming/caffe_feedback,jieshen-sjtu/caffe-for-DDNet,aravindhm/caffe,hotpxl/caffe-m2,Hilovaiserillis/caffe,MoskalenkoViktor/caffe,sguada/caffe-public,MoskalenkoViktor/caffe,naeluh/caffe,CZCV/s-dilation-caffe,CZCV/s-dilation-caffe,sguada/caffe-public,intelcaffe/caffe-old,sichenucsd/caffe_si,vibhav-vineet/caffe,hotpxl/caffe-m2,shuimulinxi/caffe,shiquanwang/caffe,yikeliu/caffe-future,nicodjimenez/caffe,xidianwlc/caffe,gnina/gnina,suixudongi8/caffe,audtlr24/caffe,aravindhm/caffe,longjon/caffe,orentadmor/caffe,Hilovaiserillis/caffe,sguada/caffe-public,suixudongi8/caffe,MoskalenkoViktor/caffe,naeluh/caffe,yikeliu/caffe-future,gnina/gnina,audtlr24/caffe,CZCV/s-dilation-caffe,wangg12/caffe,naeluh/caffe,nicodjimenez/caffe,gogartom/caffe-textmaps,gogartom/caffe-textmaps,flickr/caffe,gogartom/caffe-textmaps,niuzhiheng/caffe,sichenucsd/caffe_si,Hilovaiserillis/caffe,audtlr24/caffe,orentadmor/caffe,niuzhiheng/caffe,wangg12/caffe,dculibrk/boosted_pooling,jieshen-sjtu/caffe-for-DDNet,niuzhiheng/caffe,vibhav-vineet/caffe,shiquanwang/caffe,tackgeun/caffe,pcoving/caffe,pcoving/caffe,dylansun/caffe,shuimulinxi/caffe,audtlr24/caffe,jieshen-sjtu/caffe-for-DDNet,intelcaffe/caffe-old,vibhav-vineet/caffe,dylansun/caffe,pcoving/caffe,xidianwlc/caffe,aravindhm/caffe,CZCV/s-dilation-caffe,Hilovaiserillis/caffe,longjon/caffe,pcoving/caffe,flickr/caffe,wangg12/caffe,dylansun/caffe,hotpxl/caffe-m2,shuimulinxi/caffe,wangg12/caffe,dculibrk/boosted_pooling,minghuam/caffe,minghuam/caffe,hotpxl/caffe-m2,gnina/gnina,suixudongi8/caffe,CVML/sds_eccv2014,aravindhm/caffe,yikeliu/caffe-future,sguada/caffe-public,flickr/caffe,liuxianming/caffe_feedback,Hilovaiserillis/caffe,sguada/caffe-public,orentadmor/caffe,nicodjimenez/caffe,dculibrk/boosted_pooling,liuxianming/caffe_feedback,audtlr24/caffe,jieshen-sjtu/caffe-for-DDNet,niuzhiheng/caffe,niuzhiheng/caffe,dylansun/caffe