diff --git a/README.md b/README.md index 4593a10b24c..6c8f0f69415 100644 --- a/README.md +++ b/README.md @@ -28,9 +28,8 @@ Currently it can be built by VS2012 for x64 flatform only. This is because the d - Double click `train_lenet.bat` to see the training progress . #### Known Issues -I have trained on ImageNet with this windows porting as well. And some Issues found are: - It takes obvious longer time when you compile for the first time. Therefore please refrain from using `clean & rebuild`. -- The speed is much slower than the one built on Ubuntu. 20 iterations take 79s on Windows, whereas same number of iterations take about 30s on Ubuntu (on GTX Titan). +- I have trained on ImageNet with this windows porting as well. The speed is much slower than the one built on Ubuntu. 20 iterations take 79s on Windows, whereas same number of iterations take about 30s on Ubuntu (on GTX Titan). #### Bug Report - Please create new issues in [github](https://github.com/niuzhiheng/caffe/issues) if you find any bug. diff --git a/examples/MainCaller.cpp b/examples/MainCaller.cpp index 1466144e62d..4f1940d4a68 100644 --- a/examples/MainCaller.cpp +++ b/examples/MainCaller.cpp @@ -1,4 +1,10 @@ #include "../../tools/train_net.cpp" -//#include "../../tools/net_speed_benchmark.cpp" -//#include "../../tools/finetune_net.cpp" //#include "../../tools/test_net.cpp" +//#include "../../tools/finetune_net.cpp" +//#include "../../tools/net_speed_benchmark.cpp" +//#include "../../tools/dump_network.cpp" + +//#include "../../tools/convert_imageset.cpp" +//#include "../../tools/extract_features.cpp" +//#include "../../tools/convert_imageset.cpp" +//#include "../../tools/compute_image_mean.cpp" diff --git a/include/caffe/common.hpp b/include/caffe/common.hpp index 22e7716f7bd..3b7054e5e3c 100644 --- a/include/caffe/common.hpp +++ b/include/caffe/common.hpp @@ -13,6 +13,7 @@ #include #include // cuda driver types #include +#include // Disable the copy and assignment operator for a class. #define DISABLE_COPY_AND_ASSIGN(classname) \ diff --git a/include/wincompat.h b/include/wincompat.h new file mode 100644 index 00000000000..24eb4ac123c --- /dev/null +++ b/include/wincompat.h @@ -0,0 +1,7 @@ +#if !defined _HEADER_WIN_COMPAT_20140627_INCLUDED_ +#define _HEADER_WIN_COMPAT_20140627_INCLUDED_ + +typedef unsigned int uint; +#define snprintf _snprintf + +#endif //_HEADER_WIN_COMPAT_20140627_INCLUDED_ diff --git a/tools/extract_features.cpp b/tools/extract_features.cpp index cdad6676d7f..fa117961da9 100644 --- a/tools/extract_features.cpp +++ b/tools/extract_features.cpp @@ -87,7 +87,7 @@ int feature_extraction_pipeline(int argc, char** argv) { } */ string feature_extraction_proto(argv[++arg_pos]); - shared_ptr > feature_extraction_net( + boost::shared_ptr > feature_extraction_net( new Net(feature_extraction_proto)); feature_extraction_net->CopyTrainedLayersFrom(pretrained_binary_proto); @@ -121,7 +121,7 @@ int feature_extraction_pipeline(int argc, char** argv) { int image_index = 0; for (int batch_index = 0; batch_index < num_mini_batches; ++batch_index) { feature_extraction_net->Forward(input_vec); - const shared_ptr > feature_blob = feature_extraction_net + const boost::shared_ptr > feature_blob = feature_extraction_net ->blob_by_name(extract_feature_blob_name); int num_features = feature_blob->num(); int dim_features = feature_blob->count() / num_features; diff --git a/tools/net_speed_benchmark.cpp b/tools/net_speed_benchmark.cpp index 9e76290e691..36a00779f60 100644 --- a/tools/net_speed_benchmark.cpp +++ b/tools/net_speed_benchmark.cpp @@ -19,7 +19,6 @@ #include "caffe/solver.hpp" using namespace caffe; // NOLINT(build/namespaces) -typedef unsigned int uint; int main(int argc, char** argv) { int total_iter = 50;