{"action":"opened","issue":{"url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/926","repository_url":"https://api.github.com/repos/tiny-dnn/tiny-dnn","labels_url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/926/labels{/name}","comments_url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/926/comments","events_url":"https://api.github.com/repos/tiny-dnn/tiny-dnn/issues/926/events","html_url":"https://github.com/tiny-dnn/tiny-dnn/issues/926","id":295167584,"number":926,"title":"Errors when compiling in Visual Studio","user":{"login":"CptCaptainCptOfAllCaptains","id":36134009,"avatar_url":"https://avatars3.githubusercontent.com/u/36134009?v=4","gravatar_id":"","url":"https://api.github.com/users/CptCaptainCptOfAllCaptains","html_url":"https://github.com/CptCaptainCptOfAllCaptains","followers_url":"https://api.github.com/users/CptCaptainCptOfAllCaptains/followers","following_url":"https://api.github.com/users/CptCaptainCptOfAllCaptains/following{/other_user}","gists_url":"https://api.github.com/users/CptCaptainCptOfAllCaptains/gists{/gist_id}","starred_url":"https://api.github.com/users/CptCaptainCptOfAllCaptains/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CptCaptainCptOfAllCaptains/subscriptions","organizations_url":"https://api.github.com/users/CptCaptainCptOfAllCaptains/orgs","repos_url":"https://api.github.com/users/CptCaptainCptOfAllCaptains/repos","events_url":"https://api.github.com/users/CptCaptainCptOfAllCaptains/events{/privacy}","received_events_url":"https://api.github.com/users/CptCaptainCptOfAllCaptains/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-07T14:55:58Z","updated_at":"2018-02-07T14:55:58Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\nI'm trying to compile tiny-dnn in Visual Studio. I used the command from the wiki (`cmake -G \"Visual Studio 14 2015 Win64\" -DBUILD_EXAMPLES=ON .`) and opened the generated sln-File. When I'm trying to compile any of the examples the compiler throws the following errors:\r\n```\r\nError\tC2783\t'auto xt::zeros(const I (&)[L]) noexcept': could not deduce template argument for 'I'\tbenchmarks_all\tD:\\Downloads\\tiny-dnn-master\\tiny_dnn\\util\\util.h\t397\r\nError\tC2783\t'auto xt::zeros(const I (&)[L]) noexcept': could not deduce template argument for 'L'\tbenchmarks_all\tD:\\Downloads\\tiny-dnn-master\\tiny_dnn\\util\\util.h\t397\r\nError\tC2783\t'auto xt::zeros(S) noexcept': could not deduce template argument for 'S'\tbenchmarks_all\tD:\\Downloads\\tiny-dnn-master\\tiny_dnn\\util\\util.h\t397\r\n```\r\n\r\nAdditionaly IntelliSense shows the following errors when I open util.h:\r\n```\r\nError (active)\t\t#error directive: \"your compiler does not support AVX\"\tbenchmarks_all\td:\\Downloads\\tiny-dnn-master\\tiny_dnn\\core\\backend.h\t49\r\nError (active)\t\tno instance of overloaded function \"xt::zeros\" matches the argument list\tbenchmarks_all\td:\\Downloads\\tiny-dnn-master\\tiny_dnn\\util\\util.h\t397\r\n```\r\n\r\nThe code in question is:\r\n```\r\n// TODO(Randl): Remove after full integration of xtensor\r\ninline xt::xarray<float_t> to_xtensor(const tensor_t &t) {\r\n  if (t.size() == 0) return xt::xarray<float_t>({0, 0});\r\n  xt::xarray<float_t> result = xt::zeros<float_t>({t.size(), t[0].size()}); //<--- Line 397\r\n  for (size_t i = 0; i < t.size(); ++i)\r\n    for (size_t j = 0; j < t[0].size(); ++j) result(i, j) = t[i][j];\r\n  return result;\r\n}\r\n```\r\n\r\nFull compiler output:\r\n```\r\n1>------ Rebuild All started: Project: ZERO_CHECK, Configuration: Release x64 ------\r\n1>  Checking Build System\r\n1>  CMake does not need to re-run because D:/Downloads/tiny-dnn-master/CMakeFiles/generate.stamp is up-to-date.\r\n1>  CMake does not need to re-run because D:/Downloads/tiny-dnn-master/examples/CMakeFiles/generate.stamp is up-to-date.\r\n2>------ Rebuild All started: Project: benchmarks_all, Configuration: Release x64 ------\r\n2>  Building Custom Rule D:/Downloads/tiny-dnn-master/examples/CMakeLists.txt\r\n2>  CMake does not need to re-run because D:/Downloads/tiny-dnn-master/examples/CMakeFiles/generate.stamp is up-to-date.\r\n2>  main.cpp\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/util/util.h(397): error C2783: 'auto xt::zeros(const I (&)[L]) noexcept': could not deduce template argument for 'I'\r\n2>  d:\\downloads\\tiny-dnn-master\\tiny_dnn\\xtensor\\xbuilder.hpp(84): note: see declaration of 'xt::zeros'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/util/util.h(397): error C2783: 'auto xt::zeros(const I (&)[L]) noexcept': could not deduce template argument for 'L'\r\n2>  d:\\downloads\\tiny-dnn-master\\tiny_dnn\\xtensor\\xbuilder.hpp(84): note: see declaration of 'xt::zeros'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/util/util.h(397): error C2783: 'auto xt::zeros(S) noexcept': could not deduce template argument for 'S'\r\n2>  d:\\downloads\\tiny-dnn-master\\tiny_dnn\\xtensor\\xbuilder.hpp(71): note: see declaration of 'xt::zeros'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/optimizers/optimizer.h(162): warning C4244: '-=': conversion from 'double' to 'float', possible loss of data\r\n2>D:\\Downloads\\tiny-dnn-master\\third_party/stb/stb_image.h(2811): warning C4244: '=': conversion from 'int' to 'stbi__uint16', possible loss of data\r\n2>D:\\Downloads\\tiny-dnn-master\\third_party/stb/stb_image.h(3616): warning C4456: declaration of 'k' hides previous local declaration\r\n2>  D:\\Downloads\\tiny-dnn-master\\third_party/stb/stb_image.h(3549): note: see declaration of 'k'\r\n2>D:\\Downloads\\tiny-dnn-master\\third_party/stb/stb_image.h(3626): warning C4456: declaration of 'k' hides previous local declaration\r\n2>  D:\\Downloads\\tiny-dnn-master\\third_party/stb/stb_image.h(3549): note: see declaration of 'k'\r\n2>D:\\Downloads\\tiny-dnn-master\\third_party/stb/stb_image.h(3654): warning C4456: declaration of 'k' hides previous local declaration\r\n2>  D:\\Downloads\\tiny-dnn-master\\third_party/stb/stb_image.h(3549): note: see declaration of 'k'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/layers/power_layer.h(92): warning C4244: '=': conversion from 'double' to 'float', possible loss of data\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/layers/recurrent_layer.h(235): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/layers/recurrent_layer.h(255): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(63): warning C4458: declaration of 'i' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(100): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_a4ddadde5f722ea2a1fa3e735863bcf2>::i'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(181): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(186): warning C4458: declaration of 'i' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::i'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(189): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(194): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(199): warning C4458: declaration of 'i' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::i'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(204): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(210): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(218): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(226): warning C4458: declaration of 'i' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::i'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(229): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(234): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(239): warning C4458: declaration of 'i' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::i'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(244): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(250): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(256): warning C4458: declaration of 'i' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::i'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(259): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(264): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(269): warning C4458: declaration of 'i' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::i'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(274): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(282): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(287): warning C4458: declaration of 'i' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::i'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(290): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(295): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(300): warning C4458: declaration of 'i' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::i'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(304): warning C4458: declaration of 'o' hides class member\r\n2>  D:\\Downloads\\tiny-dnn-master\\tiny_dnn/core/kernels/lstm_cell_op_internal.h(309): note: see declaration of 'tiny_dnn::kernels::lstm_cell_op_internal::<lambda_b17e4bd90859eeaaf68f98488f6eef33>::o'\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/activations/selu_layer.h(97): warning C4244: '=': conversion from 'double' to 'float', possible loss of data\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/activations/softsign_layer.h(26): warning C4244: '=': conversion from 'double' to 'float', possible loss of data\r\n2>D:\\Downloads\\tiny-dnn-master\\tiny_dnn/activations/softsign_layer.h(38): warning C4244: '=': conversion from 'double' to 'float', possible loss of data\r\n========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========\r\n```\r\n\r\nAm I doing something wrong?"}}
{"actor":{"display_login":"CptCaptainCptOfAllCaptains"}}