[Dclib-devel] [dclib-devel] DNN : Working on sub parts of a matrix
Brought to you by:
davisking
|
From: Eloi Du B. <elo...@gm...> - 2017-11-03 18:55:46
|
Hi,
I have a matrix defined as following:
M = [nr*nc][nr*nc]
More clearly, 2 times a patch of 16x16 pixels.
Now, on my neural network, I'd like to work on two branches working on
subsets of an input matrix, meaning on each patch separately and then
concat the results.
I think I have to use the inception pattern but I'm not sure how:
I'm tempted to do something like:
template<int Index, class MatInputT>
using FeatureExtractNetT = dlib::relu<dlib::fc<8,
dlib::extract<Index, 1, kPatchDiam, kPatchDiam, MatInputT>>>;
template<class MatInputT>
using FeatureExtractNetT0 = FeatureExtractNetT<0, MatInputT>;
template<class MatInputT>
using FeatureExtractNetT1 = FeatureExtractNetT<1, MatInputT>;
template<class MatInputT>
using NetT = dlib::my_loss<dlib::fc<1, dlib::relu<dlib::fc<16,
dlib::inception2<FeatureExtractNetT0, FeatureExtractNetT1,
dlib::input<MatInputT>>>>>>;
But this throws an exception:
Error detected at line 620.
Error detected in file
d:\_dev\3rdparties\dlib\build-gpu\installrelease\include\
dlib\dnn/tensor.h.
Error detected in function class dlib::alias_tensor_instance __cdecl
dlib::alias
_tensor::operator ()(class dlib::tensor &,unsigned __int64) const.
Failing expression was offset+size() <= t.size().
Not sure why...
Thanks for any help,
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
|