{"action":"closed","issue":{"url":"https://api.github.com/repos/davisking/dlib/issues/110","repository_url":"https://api.github.com/repos/davisking/dlib","labels_url":"https://api.github.com/repos/davisking/dlib/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/davisking/dlib/issues/110/comments","events_url":"https://api.github.com/repos/davisking/dlib/issues/110/events","html_url":"https://github.com/davisking/dlib/issues/110","id":154633617,"number":110,"title":"Compile error at \"Building CXX object CMakeFiles/dnn_mnist_ex.dir/dnn_mnist_ex.cpp.o\"","user":{"login":"ChanMinPark","id":13099119,"avatar_url":"https://avatars.githubusercontent.com/u/13099119?v=3","gravatar_id":"","url":"https://api.github.com/users/ChanMinPark","html_url":"https://github.com/ChanMinPark","followers_url":"https://api.github.com/users/ChanMinPark/followers","following_url":"https://api.github.com/users/ChanMinPark/following{/other_user}","gists_url":"https://api.github.com/users/ChanMinPark/gists{/gist_id}","starred_url":"https://api.github.com/users/ChanMinPark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChanMinPark/subscriptions","organizations_url":"https://api.github.com/users/ChanMinPark/orgs","repos_url":"https://api.github.com/users/ChanMinPark/repos","events_url":"https://api.github.com/users/ChanMinPark/events{/privacy}","received_events_url":"https://api.github.com/users/ChanMinPark/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-13T04:52:07Z","updated_at":"2016-05-13T07:39:33Z","closed_at":"2016-05-13T07:39:33Z","body":"Hello,\r\n\r\nI hava a problem in compile process.\r\nfirst, I use a Raspberry Pi 3. and I download source files of dlib from github(git clone).\r\nand when I run 'cmake --build . --config Release', I meet a error below\r\n\r\n=================================================================\r\nScanning dependencies of target dnn_mnist_ex\r\n[ 60%] Building CXX object CMakeFiles/dnn_mnist_ex.dir/dnn_mnist_ex.cpp.o\r\nIn file included from /home/pi/Desktop/dlib/dlib/../dlib/dnn.h:12:0,\r\n                 from /home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:21:\r\n/home/pi/Desktop/dlib/dlib/../dlib/dnn/trainer.h: In instantiation of ‘void dlib::dnn_trainer<net_type, solver_type>::train(const std::vector<typename net_type::input_type>&, const std::vector<typename net_type::label_type>&) [with net_type = dlib::add_loss_layer<dlib::loss_multiclass_log_, dlib::add_layer<dlib::fc_<10ul, (dlib::fc_bias_mode)0u>, dlib::add_layer<dlib::relu_, dlib::add_layer<dlib::fc_<84ul, (dlib::fc_bias_mode)0u>, dlib::add_layer<dlib::relu_, dlib::add_layer<dlib::fc_<120ul, (dlib::fc_bias_mode)0u>, dlib::add_layer<dlib::max_pool_<2l, 2l, 2, 2, 0, 0>, dlib::add_layer<dlib::relu_, dlib::add_layer<dlib::con_<16l, 5l, 5l, 1, 1, 2, 2>, dlib::add_layer<dlib::max_pool_<2l, 2l, 2, 2, 0, 0>, dlib::add_layer<dlib::relu_, dlib::add_layer<dlib::con_<6l, 5l, 5l, 1, 1, 2, 2>, dlib::input<dlib::matrix<unsigned char> >, void>, void>, void>, void>, void>, void>, void>, void>, void>, void>, void> >; solver_type = dlib::sgd; typename net_type::input_type = dlib::matrix<unsigned char>; typename net_type::label_type = long unsigned int]’:\r\n/home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:105:51:   required from here\r\n/home/pi/Desktop/dlib/dlib/../dlib/dnn/trainer.h:271:90: error: no matching function for call to ‘min(long unsigned int, std::vector<dlib::matrix<unsigned char> >::size_type)’\r\n                               data.begin()+std::min(epoch_pos+mini_batch_size,data.size()),\r\n                                                                                          ^\r\n/home/pi/Desktop/dlib/dlib/../dlib/dnn/trainer.h:271:90: note: candidates are:\r\nIn file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,\r\n                 from /usr/include/c++/4.9/string:40,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/../algs.h:66,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/matrix_exp.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/matrix.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/tensor.h:8,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn.h:6,\r\n                 from /home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:21:\r\n/usr/include/c++/4.9/bits/stl_algobase.h:194:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&)\r\n     min(const _Tp& __a, const _Tp& __b)\r\n     ^\r\n/usr/include/c++/4.9/bits/stl_algobase.h:194:5: note:   template argument deduction/substitution failed:\r\nIn file included from /home/pi/Desktop/dlib/dlib/../dlib/dnn.h:12:0,\r\n                 from /home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:21:\r\n/home/pi/Desktop/dlib/dlib/../dlib/dnn/trainer.h:271:90: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘std::vector<dlib::matrix<unsigned char> >::size_type {aka unsigned int}’)\r\n                               data.begin()+std::min(epoch_pos+mini_batch_size,data.size()),\r\n                                                                                          ^\r\nIn file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,\r\n                 from /usr/include/c++/4.9/string:40,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/../algs.h:66,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/matrix_exp.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/matrix.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/tensor.h:8,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn.h:6,\r\n                 from /home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:21:\r\n/usr/include/c++/4.9/bits/stl_algobase.h:240:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare)\r\n     min(const _Tp& __a, const _Tp& __b, _Compare __comp)\r\n     ^\r\n/usr/include/c++/4.9/bits/stl_algobase.h:240:5: note:   template argument deduction/substitution failed:\r\nIn file included from /home/pi/Desktop/dlib/dlib/../dlib/dnn.h:12:0,\r\n                 from /home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:21:\r\n/home/pi/Desktop/dlib/dlib/../dlib/dnn/trainer.h:271:90: note:   deduced conflicting types for parameter ‘const _Tp’ (‘long unsigned int’ and ‘std::vector<dlib::matrix<unsigned char> >::size_type {aka unsigned int}’)\r\n                               data.begin()+std::min(epoch_pos+mini_batch_size,data.size()),\r\n                                                                                          ^\r\nIn file included from /usr/include/c++/4.9/algorithm:62:0,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/../algs.h:79,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/matrix_exp.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/matrix.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/tensor.h:8,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn.h:6,\r\n                 from /home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:21:\r\n/usr/include/c++/4.9/bits/stl_algo.h:3439:5: note: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>)\r\n     min(initializer_list<_Tp> __l)\r\n     ^\r\n/usr/include/c++/4.9/bits/stl_algo.h:3439:5: note:   template argument deduction/substitution failed:\r\nIn file included from /home/pi/Desktop/dlib/dlib/../dlib/dnn.h:12:0,\r\n                 from /home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:21:\r\n/home/pi/Desktop/dlib/dlib/../dlib/dnn/trainer.h:271:90: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long unsigned int’\r\n                               data.begin()+std::min(epoch_pos+mini_batch_size,data.size()),\r\n                                                                                          ^\r\nIn file included from /usr/include/c++/4.9/algorithm:62:0,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/../algs.h:79,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/matrix_exp.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix/matrix.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/../matrix.h:6,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn/tensor.h:8,\r\n                 from /home/pi/Desktop/dlib/dlib/../dlib/dnn.h:6,\r\n                 from /home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:21:\r\n/usr/include/c++/4.9/bits/stl_algo.h:3444:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare)\r\n     min(initializer_list<_Tp> __l, _Compare __comp)\r\n     ^\r\n/usr/include/c++/4.9/bits/stl_algo.h:3444:5: note:   template argument deduction/substitution failed:\r\nIn file included from /home/pi/Desktop/dlib/dlib/../dlib/dnn.h:12:0,\r\n                 from /home/pi/Desktop/dlib/examples/dnn_mnist_ex.cpp:21:\r\n/home/pi/Desktop/dlib/dlib/../dlib/dnn/trainer.h:271:90: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘long unsigned int’\r\n                               data.begin()+std::min(epoch_pos+mini_batch_size,data.size()),\r\n                                                                                          ^\r\nCMakeFiles/dnn_mnist_ex.dir/build.make:54: recipe for target 'CMakeFiles/dnn_mnist_ex.dir/dnn_mnist_ex.cpp.o' failed\r\nmake[2]: *** [CMakeFiles/dnn_mnist_ex.dir/dnn_mnist_ex.cpp.o] Error 1\r\nCMakeFiles/Makefile2:480: recipe for target 'CMakeFiles/dnn_mnist_ex.dir/all' failed\r\nmake[1]: *** [CMakeFiles/dnn_mnist_ex.dir/all] Error 2\r\nMakefile:76: recipe for target 'all' failed\r\nmake: * * * [all] Error 2\r\n\r\n================================================================="}}