No problem :) If you use [code]const int T7 = 0; [/code] you won't get these kinds of errors in the future. Cheers, Davis.
2012-05-26 14:11:58 PDT in dlib C++ Library
No problem. Usually header file inclusion order doesn't matter. My guess is that your custom header has some #define statements in it which #define common words to have other meanings? For example, if you had something like this in your header it would break everything: [code]#define type int[/code] since this would replace the word "type" with int in all subsequent code...
2012-05-26 11:34:00 PDT in dlib C++ Library
What is in your code you are trying to compile? The problem might be in there. Also, have you tried to compile any of the dlib example programs? They should work (I compile them often in visual studio 2010).
2012-05-26 09:16:09 PDT in dlib C++ Library
Did you add s:\projects\bcicad\program\kernel\include\dir_dlib to your include search path?.
2012-05-26 08:58:44 PDT in dlib C++ Library
I never use nmake so I'm not sure what the problem is. I assume you are able to build other applications on your computer using nmake and cmake? If so, then my guess is that the add_subdirectory() statement in your CMakeLists.txt file is something like add_subdirectory(../dlib dlib_build). Maybe nmake doesn't work with cmake when the add_subdirectory() is given folders that aren't really...
2012-05-10 14:40:17 PDT in dlib C++ Library
That depends on what you want to measure. For example, if you wanted to know the fraction of samples correctly classified then you could do something like [code]cout << "accuracy: " << sum(diag(cm))/sum(cm) << endl;[/code] where cm is your confusion matrix. But it really depends on what you want to measure. Also, the confusion matrix returned by the cross...
2012-04-23 18:28:54 PDT in dlib C++ Library
Looks good. If you have a compiler that supports the new auto keyword you can also simplify the code a little further by saying something like this: [code] auto X = dlib::munfold(arg, 0, f.num_movies, f.num_features); auto Theta = dlib::munfold(arg, f.num_movies * f.num_features, f.num_users, f.num_features); [/code] This way you don't have to explicitly declare the unfolded...
2012-04-21 10:03:55 PDT in dlib C++ Library
Oops, I just realized your X and theta aren't vectors :). So I guess you do need a combination of something to select out a part and then reshape. But in any event, I think the right thing to do is to make a single matrix_op for unfold() and then you should be good to go. Cheers, Davis.
2012-04-20 15:03:40 PDT in dlib C++ Library
Since matrix_exp is just an empty base class which things like matrix_op and matrix inherit from there isn't any way to copy it like you are trying to do. The basic problem is that [code]dlib::crop_cols(val, offset, offset + rows*columns)[/code] returns a temporary object, which is a matrix_op you defined. Then the reshape() function takes a reference to it and returns another matrix_op...
2012-04-20 15:01:34 PDT in dlib C++ Library
No worries :) Cheers, Davis.
2012-04-14 15:08:02 PDT in dlib C++ Library