From a7301a59e3bf2fbe6ebf583868ffe9d2a5b4a6a6 Mon Sep 17 00:00:00 2001 From: lltcggie Date: Mon, 11 Apr 2016 00:13:16 +0900 Subject: [PATCH] =?UTF-8?q?caffe-nv=E3=82=92=E4=BD=BF=E3=81=86=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/waifu2x.cpp | 8 ++++---- common/waifu2x.h | 4 ++-- waifu2x-caffe-dll/waifu2x-caffe-dll.vcxproj | 8 ++++---- waifu2x-caffe-gui/Source.cpp | 8 ++++---- waifu2x-caffe-gui/waifu2x-caffe-gui.vcxproj | 8 ++++---- waifu2x-caffe/Source.cpp | 8 ++++---- waifu2x-caffe/waifu2x-caffe.vcxproj | 8 ++++---- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/common/waifu2x.cpp b/common/waifu2x.cpp index 22071de..4418341 100644 --- a/common/waifu2x.cpp +++ b/common/waifu2x.cpp @@ -40,7 +40,7 @@ #ifdef _MSC_VER #ifdef _DEBUG -#pragma comment(lib, "caffe-d.lib") +#pragma comment(lib, "caffe-nv-d.lib") #pragma comment(lib, "proto-d.lib") #pragma comment(lib, "libboost_system-vc120-mt-gd-1_59.lib") #pragma comment(lib, "libboost_thread-vc120-mt-gd-1_59.lib") @@ -70,7 +70,7 @@ #pragma comment(lib, "libboost_iostreams-vc120-mt-gd-1_59.lib") #else -#pragma comment(lib, "caffe.lib") +#pragma comment(lib, "caffe-nv.lib") #pragma comment(lib, "proto.lib") #pragma comment(lib, "libboost_system-vc120-mt-1_59.lib") #pragma comment(lib, "libboost_thread-vc120-mt-1_59.lib") @@ -702,8 +702,8 @@ Waifu2x::eWaifu2xError Waifu2x::ConstractNet(boost::shared_ptr if (ret != eWaifu2xError_OK) return ret; - if (!caffe::UpgradeNetAsNeeded(caffemodel_path.string(), ¶m_caffemodel)) - return Waifu2x::eWaifu2xError_FailedParseModelFile; + //if (!caffe::UpgradeNetAsNeeded(caffemodel_path.string(), ¶m_caffemodel)) + // return Waifu2x::eWaifu2xError_FailedParseModelFile; net = boost::shared_ptr>(new caffe::Net(param_model)); net->CopyTrainedLayersFrom(param_caffemodel); diff --git a/common/waifu2x.h b/common/waifu2x.h index 7a4a73d..3cb44ad 100644 --- a/common/waifu2x.h +++ b/common/waifu2x.h @@ -10,8 +10,8 @@ #include #include -#define CUDNN_DLL_NAME "cudnn64_4.dll" -#define CUDNN_REQUIRE_VERION_TEXT "v4 RC" +#define CUDNN_DLL_NAME "cudnn64_5.dll" +#define CUDNN_REQUIRE_VERION_TEXT "v5 RC" namespace caffe diff --git a/waifu2x-caffe-dll/waifu2x-caffe-dll.vcxproj b/waifu2x-caffe-dll/waifu2x-caffe-dll.vcxproj index 38779da..d7bca03 100644 --- a/waifu2x-caffe-dll/waifu2x-caffe-dll.vcxproj +++ b/waifu2x-caffe-dll/waifu2x-caffe-dll.vcxproj @@ -59,13 +59,13 @@ Level3 Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + BOOST_ALL_NO_LIB;USE_CUDNN;_SCL_SECURE_NO_WARNINGS;GFLAGS_DLL_DECLARE_FLAG=;GFLAGS_DLL_DEFINE_FLAG=;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreadedDebugDLL Console true - cudnn64_4.dll;%(DelayLoadDLLs) + cudnn64_5.dll;%(DelayLoadDLLs) Shlwapi.lib;%(AdditionalDependencies) @@ -77,7 +77,7 @@ MaxSpeed true true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + BOOST_ALL_NO_LIB;USE_CUDNN;_SCL_SECURE_NO_WARNINGS;GFLAGS_DLL_DECLARE_FLAG=;GFLAGS_DLL_DEFINE_FLAG=;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreadedDLL @@ -85,7 +85,7 @@ true true true - cudnn64_4.dll;%(DelayLoadDLLs) + cudnn64_5.dll;%(DelayLoadDLLs) Shlwapi.lib;%(AdditionalDependencies) diff --git a/waifu2x-caffe-gui/Source.cpp b/waifu2x-caffe-gui/Source.cpp index 3fc6a1d..f35d020 100644 --- a/waifu2x-caffe-gui/Source.cpp +++ b/waifu2x-caffe-gui/Source.cpp @@ -2237,12 +2237,12 @@ int WINAPI WinMain(HINSTANCE hInstance, ChangeWindowMessageFilter(0x0049, MSGFLT_ADD); // Caffeのエラーでないログを保存しないようにする - google::SetLogDestination(google::INFO, ""); - google::SetLogDestination(google::WARNING, ""); + google::SetLogDestination(google::GLOG_INFO, ""); + google::SetLogDestination(google::GLOG_WARNING, ""); // Caffeのエラーログを「error_log_〜」に出力 - google::SetLogDestination(google::ERROR, "error_log_"); - google::SetLogDestination(google::FATAL, "error_log_"); + google::SetLogDestination(google::GLOG_ERROR, "error_log_"); + google::SetLogDestination(google::GLOG_FATAL, "error_log_"); // CDialogクラスでダイアログを作成する CDialog cDialog; diff --git a/waifu2x-caffe-gui/waifu2x-caffe-gui.vcxproj b/waifu2x-caffe-gui/waifu2x-caffe-gui.vcxproj index 80addd6..8fce046 100644 --- a/waifu2x-caffe-gui/waifu2x-caffe-gui.vcxproj +++ b/waifu2x-caffe-gui/waifu2x-caffe-gui.vcxproj @@ -58,13 +58,13 @@ Level3 Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + BOOST_ALL_NO_LIB;USE_CUDNN;_SCL_SECURE_NO_WARNINGS;GFLAGS_DLL_DECLARE_FLAG=;GFLAGS_DLL_DEFINE_FLAG=;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=;WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreadedDebugDLL Windows true - cudnn64_4.dll;%(DelayLoadDLLs) + cudnn64_5.dll;%(DelayLoadDLLs) Shlwapi.lib;%(AdditionalDependencies) @@ -79,7 +79,7 @@ MaxSpeed true true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + BOOST_ALL_NO_LIB;USE_CUDNN;_SCL_SECURE_NO_WARNINGS;GFLAGS_DLL_DECLARE_FLAG=;GFLAGS_DLL_DEFINE_FLAG=;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=;WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) MultiThreadedDLL @@ -87,7 +87,7 @@ true true true - cudnn64_4.dll;%(DelayLoadDLLs) + cudnn64_5.dll;%(DelayLoadDLLs) Shlwapi.lib;%(AdditionalDependencies) diff --git a/waifu2x-caffe/Source.cpp b/waifu2x-caffe/Source.cpp index 039e746..9c94e2c 100644 --- a/waifu2x-caffe/Source.cpp +++ b/waifu2x-caffe/Source.cpp @@ -55,12 +55,12 @@ int main(int argc, char** argv) Waifu2x::init_liblary(); // Caffeのエラーでないログを保存しないようにする - google::SetLogDestination(google::INFO, ""); - google::SetLogDestination(google::WARNING, ""); + google::SetLogDestination(google::GLOG_INFO, ""); + google::SetLogDestination(google::GLOG_WARNING, ""); // Caffeのエラーログを「error_log_〜」に出力 - google::SetLogDestination(google::ERROR, "error_log_"); - google::SetLogDestination(google::FATAL, "error_log_"); + google::SetLogDestination(google::GLOG_ERROR, "error_log_"); + google::SetLogDestination(google::GLOG_FATAL, "error_log_"); // definition of command line arguments TCLAP::CmdLine cmd("waifu2x reimplementation using Caffe", ' ', "1.0.0"); diff --git a/waifu2x-caffe/waifu2x-caffe.vcxproj b/waifu2x-caffe/waifu2x-caffe.vcxproj index 0056724..712bf33 100644 --- a/waifu2x-caffe/waifu2x-caffe.vcxproj +++ b/waifu2x-caffe/waifu2x-caffe.vcxproj @@ -58,13 +58,13 @@ Level3 Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + BOOST_ALL_NO_LIB;USE_CUDNN;_SCL_SECURE_NO_WARNINGS;GFLAGS_DLL_DECLARE_FLAG=;GFLAGS_DLL_DEFINE_FLAG=;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreadedDebugDLL Console true - cudnn64_4.dll;%(DelayLoadDLLs) + cudnn64_5.dll;%(DelayLoadDLLs) Shlwapi.lib;%(AdditionalDependencies) @@ -76,7 +76,7 @@ MaxSpeed true true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + BOOST_ALL_NO_LIB;USE_CUDNN;_SCL_SECURE_NO_WARNINGS;GFLAGS_DLL_DECLARE_FLAG=;GFLAGS_DLL_DEFINE_FLAG=;GLOG_NO_ABBREVIATED_SEVERITIES;GOOGLE_GLOG_DLL_DECL=;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreadedDLL @@ -84,7 +84,7 @@ true true true - cudnn64_4.dll;%(DelayLoadDLLs) + cudnn64_5.dll;%(DelayLoadDLLs) Shlwapi.lib;%(AdditionalDependencies)