microsoft / caffe Goto Github PK
View Code? Open in Web Editor NEWThis project forked from bvlc/caffe
Caffe on both Linux and Windows
License: Other
This project forked from bvlc/caffe
Caffe on both Linux and Windows
License: Other
Trying to get a basic example working before I go off and use it on my own, but can't get the lmdb file to file to be created. Leveldb backend works fine so I think it has something to do with the example, but I'm unsure why it fails to open.
BUILD = /Build/x64/Release
DATA = /data/mnist
BACKEND = lmdb
Edit: Figured it out. The default example tries to initialize the database with 1TB. LMDB does not incrementally size in windows so it will fail if you don't have 1TB of hard drive space free. Recommend a fix to something like 10MB or something. I think the DB only needs around 8MB.
A classification app will be available here.
according to this tutor located at https://github.com/Microsoft/caffe/blob/master/examples/cifar10/readme.md, i have successfully got all necessary executable files, download dataset, convert, etc.
But I ends with an error when I executing build\x64\Release\caffe train --solver="X:/caffe/examples/cifar10/cifar10_quick_solver.prototxt"
from X:\caffe\
, there are a lot outputs, and the last 3 lines are
I0315 23:34:06.160449 7416 solver.cpp:338] Iteration 0, Testing net (#0)
F0315 23:34:06.171448 7416 pooling_layer.cu:212] Check failed: error == cudaSuccess (8 vs. 0) invalid device function
*** Check failure stack trace: ***
I have tried with Release build and Debug build, both ends with same thing, one message box ask me if I want debug the error with nothing details.
Just wonder if anyone have made this working and may knew what this error means?
Thanks very much~
Error 8559 error C2220: warning treated as error - no 'object' file generated (....\src\caffe\util\math_functions.cpp) C:\NugetPackages\boost.1.59.0.0\lib\native\include\boost\format\alt_sstream_impl.hpp 1 1 libcaffe
Error 8561 error LNK1104: cannot open file 'libcaffe.lib' C:\caffe\windows\caffe.managed\LINK caffe.managed
Error 8562 error LNK1104: cannot open file 'libcaffe.lib' C:\caffe\windows\caffe\LINK caffe
Error 8563 error LNK1104: cannot open file 'libcaffe.lib' C:\caffe\windows\compute_image_mean\LINK compute_image_mean
Error 8564 error LNK1104: cannot open file 'libcaffe.lib' C:\caffe\windows\extract_features\LINK extract_features
Error 8565 error LNK1104: cannot open file 'libcaffe.lib' C:\caffe\windows\convert_imageset\LINK convert_imageset
Error 8582 error LNK1104: cannot open file 'libcaffe.lib' C:\caffe\windows\matcaffe\LINK matcaffe
Error 8693 error LNK1104: cannot open file 'libcaffe.lib' C:\caffe\windows\pycaffe\LINK pycaffe
Error 8720 error LNK1104: cannot open file 'libcaffe.lib' C:\caffe\windows\test_all\LINK test_all
I have no idea what happened. Could you help me?
I am using Cuda 7.5 and VS2013.
When I set false to true, I get
cudnn.h missing error. I checked the Cuda include folder and did not see the header.
Any help will be appreciated.
Thanks
I followed this guide https://github.com/BVLC/caffe/wiki/Development for adding a new layer, but when I try to build it in Visual Studio, I'll get this error:
error LNK2001: unresolved external symbol "public: __cdecl caffe::NewLayerDataParameter::NewLayerDataParameter(class caffe::NewLayerDataParameter const &)" (??0NewLayerDataParameter@caffe@@qeaa@AEBV01@@z) C:\BuildDirectory\caffe-master\windows\pycaffe\new_layer_data_layer.obj
Interestingly, the new layer builds and works fine using cmake on Linux.
I'm having trouble building pycaffe, I'm not sure if it's some problem with my local setup. It seems to me there're two issues:
Am I missing something obvious here ? Is there an easier way ?
Thx for the project and happy new year!
Any update on this, @pavlejosipovic ?
Hi, everyone! Could you please give me some suggestions to this issues in Matlab, thank you
[scores, maxlabel] = classification_demo(im, 1);
Invalid MEX-file 'C:...\caffemaster\Build\x64\Release\matcaffe+caffe\private\caffe_.mexw64': not found
Error in caffe.set_mode_gpu (line 5)
caffe_('set_mode_gpu');
Error in classification_demo (line 66)
caffe.set_mode_gpu();
8468 im2col.cu 61 caffe check failed;error==cudaSuccess(8 vs.0) invalid device function.....
My GPU is GEFORCE 820m,and installed CUDA7.5。
5 IntelliSense: cannot open source file "Python.h"
2 IntelliSense: cannot open source file "pyconfig.h"
3 IntelliSense: cannot open source file "patchlevel.h"
4 IntelliSense: #error directive: Python 2.2 or higher is required for this version of Boost.Python.
error C1083: Cannot open include file: 'pyconfig.h': No such file or directory
Hi, everyone. This is my problem when I am building caffe. What should I do? THX
I use the Matlab R2015b, and I try to test the classification_demo, after downloading the caffemodel from model zoo, I found that classification_demo crashed at the net.forward step, someone could tell me what happened to this?
A caffe model was trained under the ubuntu. When run the model under windows, the recognition result is differen from the ubuntu's.
I wonder the reason why different results present by using the same code of Caffe?
I see that in this fork the source of MatCaffe is also available, but I don't see anywhere how it could be compiled for Windows, following the caffe.sln way, configuring the compilation options by editing the CommonSettings.props file. Is there any plan to do it? Or should this be done using an alternative way, like for example, with Cmake?
Hi all.
I build the caffe but do not see release version in build/64 folder. Is that something wrong? Also I could not find how to use it once it is built successfully. I was able to use caffe on ubuntu but the problem was I cannot use gpu version since it is on virtual box. I'd like to tank in advamce to all.
I'm compiling Caffe using IncrediBuild, as this should be the only way to ensure parallel compilation of Cuda files within MS Visual Studio. Unfortunately the cuda compilation is not parallelised across my machine's cores, and it takes about 4 and a half minutes to compile for a single microarchitecture (Maxwell 5.0 in my case).
Does any of you have experience with slow cuda compilation times and how to improve them?
I could not find this folder
<caffe_root>\Build\x64\Release\pycaffe
Instead of that I found this folder <caffe_root>\Build\x64\Release\pycaffe\x64\Debug
please any help
Hello,
I want to know does it support win7 32 bit operator system?
Thanks in advance
Hi
I tried to build on VS 2015 but I receive
caffe.vcxproj(35,5): The imported project "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\BuildCustomizations\CUDA 7.5.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
any help?
thanks a lot
using AppVeyor
My cudnn path is C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\cudnn. When compiling, BinplaceCudaDependencies.cmd failed saying 'Files\NVIDIA was unexpected at this time.' . I managed to fix this by surrounding %CUDNN_PATH% with quote marks on line 19.
The script to generate proto files is in scripts/GeneratePB.bat
. It checks for existence of output PB files and skips generating new ones if those exist. Need to update the logic so that it checks for changes in the input proto file, not the existence of generated files.
ExtractOutputs
to GetLayerValues
.GetLayerValues
takes a buffer and fill that buffer. That way, we don't have to repeatedly allocate new arrays.FYI, @leizhangcn
There is no roi pooling layer and I want to run faster rcnn. How can I add roi pooling layer into the project?
I have set CpuOnlyBuild to true and set UseCuDNN to false,but when I click caffe.sdf ,it is wrong,and show "错误 1 error C1083: 无法打开包括文件: “caffe/proto/caffe.pb.h”: No such file or directory
"
Firstly, thank you for your sharing the project. But, when I generated the project after Nuget downloaded the 3rd party, I encountered some errors, for example: cannot open file "google/protobuf/unknown_field_set.h".
Thus I switched to directory "google/protobuf/", there is only one file. So what can I do for this phenomenon?
Run into four MSB3030 errors during build. This is the first one:
1>C:\github\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets(57,5): error MSB3030: Could not copy the file "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT\msvcr120.dll" because it was not found.
The corresponding lines in C:\github\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets:
<Target Name="OpenCV_AfterBuild" AfterTargets="AfterBuild"> <Copy SkipUnchangedFiles="true" SourceFiles="@(CopyToOutput)" UseHardlinksIfPossible="true" DestinationFolder="$(TargetDir)"> <Output TaskParameter="DestinationFiles" PropertyName="DestinationFiles" /> <Output TaskParameter="DestinationFiles" ItemName="DestinationFiles" /> <Output TaskParameter="CopiedFiles" PropertyName="CopiedFiles" /> <Output TaskParameter="CopiedFiles" ItemName="CopiedFiles" /> </Copy> </Target>
I don't have VC installed in "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC", but I couldn't find where this path is set in the project files either.
This is needed to support concurrent predictions.
cc @leizhangcn
mil and mil_data layers should be removed as they are not generally useful.
Hi, I just want to use the libcaffe.lib in my project, but I encountered this problem, how can I solve it? Thank you
Error from openblas.targets
:
E:\msCaffe\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets(57,5): error MSB3030: Could not copy the file "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT\msvcr120.dll" because it was not found.
E:\msCaffe\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets(57,5): error MSB3030: Could not copy the file "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT\msvcp120.dll" because it was not found.
E:\msCaffe\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets(57,5): error MSB3030: Could not copy the file "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\Debug_NonRedist\x64\Microsoft.VC120.DebugCRT\msvcr120d.dll" because it was not found.
E:\msCaffe\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets(57,5): error MSB3030: Could not copy the file "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\Debug_NonRedist\x64\Microsoft.VC120.DebugCRT\msvcp120d.dll" because it was not found.
LevelDb.lib(builder.obj) : warning LNK4099: PDB 'vc120.pdb' was not found with 'LevelDb.lib(builder.obj)' or at 'E:\msCaffe\caffe\Build\x64\Debug\vc120.pdb'; linking object as if no debug info
LINK : fatal error LNK1104: cannot open file 'python27_d.lib'
.
.
.
========== Build All: 1 succeeded, 8 failed, 0 skipped ==========
This is not the complete log.
I don't know why the targets file is referring to C:\Program Files (x86)\Microsoft Visual Studio 12.0
when my installation is in E:\Microsoft Visual Studio 12.0
.
How should I correct it?
Add to code files.
#pragma warning(push, 0)
//include of 3rdparty headers
#pragma warning(pop)
A no-code-change solution would be preferred.
Hi. I've seen that the current version uses OpenCV 2.4.10 as dependence, which is quite outdated, and I had the intention to use a more recent one like OpenCV 3.0 or 3.1. However, in NuGet I've seen that the repo used for this doesn't contain newer versions (https://www.nuget.org/packages/OpenCV/). I've seen that there are other alternative repos (like this: https://www.nuget.org/packages/opencv3/), but even if I've been able to compile Caffe with that, by updating the .vcxproj files and the packages.config files accordingly, then I've seen that I still couldn't run the generated executables (for example test_all.exe) because the OpenCV dll-s were missing. Indeed, they aren't available in that specific NuGet repo, apparently (I'm not an expert user of NuGet). Does this mean that somebody should upload the recent OpenCV versions in a specific way to NuGet, or am I missing something else about how to use NuGet? Did anyone face this issue?
every time when I debug extract features project, it will happen that
1> ProtoCompile.cmd : Create proto include directory
1> 子目录或文件 H:\Project\CAFFE\windows_caffe_dev\caffe-master\windows..\include\caffe\proto 已经存在。
1> ProtoCompile.cmd : Compare newly compiled caffe.pb.h with existing one
have you ever meet this problem, and how to solve it? thanks~~
Are you guys interested in adding CPU-only builds ? I tried this and it actually worked. I see two ways to do this:
At the very least, precompile 3rd-party header files
successful build with VS2013, Win 10, CUDA 7.5 cuDNN and matlab 2105b.
when trying to run from matlab cmd line I get the following error
invalid mex-file "caffe_mex64" the specified module could not be found
tried using dependency checker and many dlls are missing. Is there something incompatible in my setup?
I just download the master branch build in the mode Release and x64 it says
error LNK1181: cannot open input file 'libcaffe.lib '..Projects\caffe-master\windows\caffe\LINK caffe
and
error C1083: Cannot open include file: 'caffe/util/mkstemp.hpp': error C1083: Cannot open include file: 'caffe/util/mkstemp.hpp': No such file or directory (....\src\gtest\gtest-all.cpp)
this error C1083 also exists in many other cpp files
thank you all, guys!!!
I am trying to use caffe.managed.dll in my C# code (just declaring a new CaffeModel).
When the program starts it immediately fails, before getting to the lines where I declare the network.
When I am debugging the code with "Enable native code debugging" I get the following exceptions:
"Microsoft C++ exception: EEFileLoadException * __ptr64 at memory location 0x004da798"
When pressing continue I get:
"Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in...
Additional Information: The runtime has encountered a fatal error. The address of the error was at 0xeb982f9b, on thread 0x1df4. The error code is 0x80131506. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack."
I am using visual studio 2013, windows 7. The output is attached
Output.txt
Since I'm using the Chinese version of vs2013, I can only describe my issue in the followiing words.
First I meet the issue #34, and I solved it after I refer to #33, and I recompile "libcaffe.lib"
but errors occured when the following output was printed on the screen.
It means
D:\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.targets(57,5): error MSB3030 : cannot copy file " C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\redist\x64\Microsoft.VC120.CRT\msvcr120.dll" , reason : cannot find the file.
I've checked all the instructions and I have no idea where went wrong.
Thanks for you help.
I added a new dll project to the solution, most of setting was similar with "caffe.managed". But it compiled error when including caffe header files, just like "caffe/caffe.hpp". All the errors were in "caffe.pb.h", but all other projects were compiled successfully. So it may be sth wrong with my dll project setting. Could you give some advices?
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.5.targets(160,9): error MSB4062: 未能从程序集 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\Nvda.Build.CudaTasks.v7.5.dll 加载任务“Nvda.Build.CudaTasks.SanitizePaths”。未能加载文件或程序集“Microsoft.Build.Utilities.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”或它的某一个依赖项。系统找不到指定的文件。 请确认 声明正确,该程序集及其所有依赖项都可用,并且该任务包含实现 Microsoft.Build.Framework.ITask 的公共类。
Anyone can solve this problem?
I compiled the solution successfully, however, the compilation failed when trying to add a new proj to the solution. It prompted "error LNK2001: unresolved external symbol __imp_H5Gclose", as it link hdf5 library failed. I operated as follow
And the new project has only one cpp file "main.cpp", which is exactly same to "caffe.cpp". and the new generated "packages.config" is the same too.
One difference I noticed is that in "main.cpp" properties -> C/C++ -> Command Line, it lacks "/I"D:\caffe\NugetPackages\hdf5-v120-complete.1.8.15\build\native....\lib\native\include" " and "/D "HAS_HDF5"" comaring to caffe.cpp in project caffe. it seems adding hdf5 lib linker failed when using NuGet, but in NuGet packages manager, it displayed OK
Could you give some advice about adding a new project for using caffe.lib, a opeation step will be great. thanks a lot!
As with other Caffe ports, the layers are not registered properly unless a visual studio reference to libcaffe with the option Use Library Dependency Inputs
is added.
This is a problem because it makes difficult to use Caffe in external projects (you would have to include libcaffe into your solution and add it as a reference to the project that uses the library).
I use cup only and disable cudnn.
the nuget had download packet in \windows\packages, but the project can't find it. why?
error msg:
This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ......\NugetPackages\OpenCV.2.4.10\build\native\OpenCV.props. libcaffe win_caffe\windows\libcaffe\libcaffe.vcxproj 374
I run the cifar10 example and the log information shows in the command line window, but I can't find these log information saved in my caffe root folder. I'm wondering does this fork of caffe generate log\*.txt
files while running?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.