happynear / caffe-windows Goto Github PK
View Code? Open in Web Editor NEWConfigure Caffe in one hour for Windows users.
License: Other
Configure Caffe in one hour for Windows users.
License: Other
Hi, I have successfully compiled yours caffe-windows witch matcaffe interface. I also try build caffe-future to use witch Fully Convolutional Networks (https://github.com/longjon/caffe/tree/future), I used your project matcaffe to adapt for new code, but I get several errors and dont know what to do :
Error 79 error LNK2001: unresolved external symbol "bool _cdecl caffe::ReadProtoFromBinaryFile(char const *,class google::protobuf::Message *)" (?ReadProtoFromBinaryFile@caffe@@YA_NPEBDPEAVMessage@protobuf@google@@@z) C:\caffe\caffe\MSVCmex\caffe.obj 1 1 matcaffe
Error 248 error LNK2001: unresolved external symbol "protected: virtual class caffe::LayerParameter __cdecl caffe::SPPLayer::GetPoolingParam(int,int,int,class caffe::SPPParameter)" (?GetPoolingParam@?$SPPLayer@N@caffe@@Meaa?AVLayerParameter@2@HHHVSPPParameter@2@@z) C:\caffe\caffe\MSVCmex\force_link.obj 1 1 matcaffe
Error 177 error LNK2001: unresolved external symbol "protected: virtual unsigned int __cdecl caffe::WindowDataLayer::PrefetchRand(void)" (?PrefetchRand@?$WindowDataLayer@N@caffe@@MEAAIXZ) C:\caffe\caffe\MSVCmex\force_link.obj 1 1 matcaffe
and so on....
Some errors :
Error 22 error C2061: syntax error : identifier 'BNLayer' C:\caffe\src\caffe\util\force_link.cpp 8 1 matcaffe
Error 23 error C2061: syntax error : identifier 'InsanityLayer' C:\caffe\src\caffe\util\force_link.cpp 27 1 matcaffe
and so on ...
I solved by comment appropriate REGISTER_LAYER_CLASS(BN);,....
Successfully build mex file but unable to run the demo. The mex file is in private folder but cannnot add it to Matlab path.
Invalid MEX-file 'D:\caffe-windows\matlab+caffe\private\caffe_.mexw64': The specified module could not be found.
Error in caffe.set_mode_gpu (line 5)
caffe_('set_mode_gpu');
Error in classification_demo (line 66)
caffe.set_mode_gpu();
First off, thanks so much for putting this together! I've tried a couple other windows ports, and this is the only one I've managed to compile.
I've got MainCaller and pycaffe building successfully, but when I download the mnist leveldb database and ran ./run_mnist.bat to run the MNIST demo, I got the following error:
"The program can't start because hdf5_hl.dll is missing from your computer. Try reinstalling the program to fix this problem."
I confirmed that hdf5_hl.dll was present in the 3rdparty/bin folder, and also tried installing the HDF software from https://www.hdfgroup.org/HDF5/release/obtain5.html. Do I need to set an environment variable here, or check that something is linked properly in the solution before building?
Thanks again!
Hi~, I would like to know if this caffe has linux version. Thanks a lot ^^
Hi,
I've managed to compile classification.cpp without any problem. But I want it to use with the CPU Mode and I cant get it to work. I keep getting this CUDA error:
F1003 19:48:48.537168 1992 cudnn_conv_layer.cpp:31] Check failed: error == cudaSuccess (35 vs. 0) CUDA driver version is insufficient for CUDA runtime version
I tried forcing it with the line "Caffe::set_mode(Caffe::CPU);" and playing with the VS compiling properties but with no success.
I am sure I am missing someting, can you help me pls?
感谢你无私的分享,我是个菜鸟,在编译您的工程时报错,在filler.hpp的2.3行
Dtype alpha = this->filler_param_.alpha;
错误 255 error : a pointer to a bound function may only be used to call the function D:\deepid\include\caffe\filler.hpp 203
it produced an error in lexical_cast.hpp(300) array is not a member of std . Do you have any idea about this problem? thank you very much
It seems that this version of Caffe encounters severe memory leak, the memory can be up to > 100GB, will you fix this.
Hi All,
I have images that are 16 bits and I saved them in tiff format image.
I am new in the DL caffe.
From my understanding caffe deep learning does not support 16 bits images.
If it does not is there a way easly to make a a change in the data layer such that these images 16 bits can be supported.
I prefer not to use the hdf5 fromat.
if you know where in the code I should make modification please let me know.
Thanks
Jhon Smithdir
Thanks for the port of your code. (I've learned immensely from it.)
FYI, the implementation of CovarianceLayer<>::Backward_cpu() is incorrect.
The first thing it does is get a mutable pointer to the top Blob. During backprop it shouldn't be modifying the top Blob, only the bottom Blob.
template <typename Dtype>
void CovarianceLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down,
const vector<Blob<Dtype>*>& bottom) {
Dtype* top_diff = top[0]->mutable_cpu_diff();
...
cheers,
Doug
The debug version of caffe-windows seems not to work, could you check it?
Hi,
I successfully compile all the projects in VS2013.
However, I can not run the run_mnist.bat.
The error is: internal_thread.cpp:26 check failed:error == cudaSuccess(35 vs. 0)
CUDA driver version is insufficient for CUDA runtime version
I dont have a gpu, so I modify the run_mnist.bat as following:
.\bin\caffe.exe train --solver=examples/mnist/lenet_solver.prototxt
pause
and modify the lenet_solver.prototxt as following:
solver_mode: CPU
How can I run the run_mnist.bat successfully?
Hoping for replies as soon as possible.
Sincerely yours!
In the notebook example of caffe, for the following code:
from caffe import layers as L
from caffe import params as P
Traceback:...
ImportError: cannot import name layers
Also, for this line:
n = caffe.NetSpec()
Traceback:...
AttributeError: 'module' object has no attribute 'NetSpec'
Can this be fixed?
I used your (new)3rd party for VS 2013 and cuda 7 but when I try to build I get the error '_MSC_VER' value mismatch (value 1700 doesn't match value 1800) in layer_factory.obj and in_caffe.obj. How should I resolve it?
Thanks
Hi :
thank you for your sharing code. i have some questions.
1 how to use your code to train a GoogLeNet for FaceVerification.
2 if i had trained the mode , how to use the model for FaceVerification.
can you give a tutorial ?
thnaks
Hi, I want to use the cpp_classification example, but I have some issues
I compiled caffe and caffelib project in visual studio, but classificaiton.bin is not automatically build.
When I use the comand : ./scripts/download_model_binary.py models/bvlc_reference_caffenet
I obtain the error : ERROR: model did not download correctly! Run this again.
( I have also error in the file download_model_binary.py with the line :
speed = int(progress_size / (1024 * duration))
because duration = 0 )
after updating the dependency and include paths, both MainCalled and pycaffe compile fine. however, _caffe.so
(or _cafe.dll
) is missing, so importing caffe will fail. it's not a path issue, the file is not created at compilation.
>>> import caffe
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Kevin\Desktop\caffe_w\caffe-windows\python\caffe\__init__.py", line 1, in <module>
from .pycaffe import Net, SGDSolver
File "C:\Users\Kevin\Desktop\caffe_w\caffe-windows\python\caffe\pycaffe.py", line 13, in <module>
from ._caffe import Net, SGDSolver
ImportError: DLL load failed: The specified module could not be found.
Hi happynear,
First of all, your repo of Caffe for Windows is an enormous help. Thank you.
Now, after the MNIST example worked smoothly, I am learning to operate the Caffe with my own data/models. Can you please guide me how to use the .sh scripts for data generation, or how to translate them into batch files? Maybe you have an example?
Thank you,
Joseph
Hello!
As I see, covariance_layer was renamed to gram_layer.
I see these changes in .vcxproj files, but can't find gram_layer.cpp in src/caffe/layers.
covariance_layer.cpp was removed (not renamed) two commits early...
Maybe I miss something?
Hi! First of all congratulations for the fantastic work, it is very easy to install!
I need to use the Matlab Wrapper. In this version there is the interface, so for example I can use this command:
% Initialize a network
net = caffe.Net(net_model, net_weights, phase);
I don't know why it doesn't work, but the caffe api works perfectly (e.g. caffe_('set_device', device_id);).
I have to create the interface 'caffe' in such a way, can you tell me how? Thanks
您好, 请问如何编译tools中其它cpp以得到其它工具?
Hi,
I'm trying to use this caffe branch to run faster-rcnn on Windows. I'm using VC++2013 + Matlab R2013a on Win8.1.
Thank for your help. I can successfully compile caffe, pycaffe, and matcaffe. However, I failed to compile faster-rcnn. (https://github.com/happynear/faster_rcnn)
The error suggests that I'm using objects compiled with different versions of MSVC++:
_MSC_VER = 1800 vs. _MSC_VER = 1600
I would like to know, what are your VC++ / Matlab / Windows versions?
(Maybe I should issue it on the faster-rcnn branch, but I could not find the button.)
前辈,我已经按照您的方法编译出来了 第三步的测试文件也能正常运行 然后我想跑自己的数据,编译了convert_imageset.cpp,将编译出来的maincaller.exe改成了convert_imageset.exe,把图片也整理了,也有txt文件,都是按照格式弄的 写了一个批处理命令:
SET GLOG_logtostderr=1
bin\convert_imageset.exe mine/train/ mine/train.txt mine/mtrainldb 0
pause
但是运行后并没有开始转换,而是直接显示程序已停止运行,是因为命令不对 还是缺少依赖库?编译的时候报了很多warning LNK4099: 未找到 PDB“vc120.pdb”(使用“leveldb.lib(db_impl.obj)”或在“E:\Developer\caffe\bin\vc120.pdb”中寻找);正在链接对象,如同没有调试信息一样 如果是缺少依赖库的话 是否应该在vc目录里面的附加依赖库里面添加?
@happynear
It's not possible to download any third-party libraries from the links you've posted. I've tried using Chrome, Opera, Firefox and Internet Explorer
Thanks
In the forward phase,
you use the code below:
static_cast(bottom[2]->cpu_data()[i]) == static_cast(bottom[3]->cpu_data()[i])
However in the BP phase,the code is
static_cast(bottom[2]->cpu_data()[j])==static_cast(bottom[2]->cpu_data()[j])
Is that right?
I compile python wrapper for caffe successfully but when I want to import caffe I got into this error.
Traceback (most recent call last):
File "", line 1, in
File "caffe__init__.py", line 1, in
from .pycaffe import Net, SGDSolver
File "caffe\pycaffe.py", line 10, in
from ._caffe import Net, SGDSolver
ImportError: DLL load failed: The specified module could not be found.
How can I make it work?
Thanks
I have caffe working properly on my pc but I get an error when I try to use the pretrained model. I followed the instructions in filter_visualization example and when I run the
net = caffe.imagenet.ImageNetClassifier(...)
I get the error "name 'imagenet' is not defined"
and when I try
net = caffe.imagenet.ImageNetClassifier(...)
I get the "module object has no attribute ImageNetClassifier" error.
I need your help. Thanks.
Hi happynear,
I need to build LMDB's from my own data. I have installed the Cygiwn in order to execute the .sh scripts and compiled convert_imageset,cpp the way you suggested, by replacing the main .cpp in the MainBuilder project.
However, when I try to execute the .sh script which creates leveldbs, it fails to run claiming dll's are missing. I copied all the dll's into the running folder, but then I get an error
error while loading shared libraries: ?: cannot open shared object file: No such file or directory
Can you please share the method you use to build the leveldbs and the mean.binaryproto image in the Windows environment? Or there is a way to train a network using the raw JPG images?
Thank you,
Joseph
A little bit worry about the compatibility issue.
记得原版的tools目录下的文件可以编译成为对应的.bin文件
请问windows版的也能编译成.exe文件吗?
谢谢
@happynear Thanks a lot for your work. I tried this with my own data and networks (1 convolutional + 2 fully connected), finding using gpu+cuDNN v3 is much slower than using gpu only (Time: CPU>>GPU+cuDNN>GPU only). I tried different batch sizes but the results showed that cuDNN is at least twice slower than gpu only, especially on the backward pass (at least 3 times slower). I'm quite new in caffe and currently working with C++ (vs2013) on windows, do you have any idea of the possible reasons? Many thanks!
When I try to run matcaffe_demo.m I got the
Invalid MEX-file ... \caffe-windows-master\matlab\caffe\caffe.mexw64': The
specified procedure could not be found.
Could you please help me out?
Thanks
I compiled caffe successfully with your instructions then I run_mnist.bat I got to the errors saying it doesn't have a bunch of dlls that some of them are in your 3rdparty folder and some of them are not.I copied the needed dlls to the bin folder.
Now I got to the error CUDNN_STATUS_ARCH_MISMATCH.I googled it and found that my GPU can't work with cuDNN and I should change the config file to not use cudnn.
Where exactly is the config file and how can I change to not using cuDNN?
Thanks
Hi Happynear,
I noticed that you have implemented the transformer layer recently. My understanding is that this layer is related to the spatial transformer layer from the recent arxiv "Spatial Transformer Network". It will be perfect if you could provide some examples of using this transformer layer.
Thank you
Kevin
Can I use this with CUDA 6.5 somehow? I downloaded already a older version in the tree. When now opening the caffe-windows-master\buildVS2013\MainBuilder.sln these errors appear:
D:\code\caffe-windows\buildVS2013\MSVC\MainBuilder.vcxproj : error : Unable to read the project file “MainBuilder.vcxproj”.
D:\code\caffe-windows\buildVS2013\MSVC\MainBuilder.vcxproj(52,5): The imported project “C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.0.props” was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
D:\code\caffe-windows\buildVS2013\MSVCmex\matcaffe.vcxproj : error : Unable to read the project file “matcaffe.vcxproj”.
D:\code\caffe-windows\buildVS2013\MSVCmex\matcaffe.vcxproj(52,5): The imported project “C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.0.props” was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
D:\code\caffe-windows\buildVS2013\python\pycaffe.vcxproj : error : Unable to read the project file “pycaffe.vcxproj”.
D:\code\caffe-windows\buildVS2013\python\pycaffe.vcxproj(299,5): The imported project “C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA 7.0.props” was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Hi
Please help me, I can't use smoothL1Loss to implement Fast r-cnn
net = caffe.Classifier('tmp.prototxt', param_fn,
mean = np.float32([104.0, 116.0, 122.0]),
channel_swap = (2,1,0))
caffe\python\caffe\classifier.pyc in __init__(self, model_file, pretrained_file, image_dims, mean, input_scale, raw_scale, channel_swap)
27
28 # configure pre-processing
---> 29 in_ = self.inputs[0]
30 self.transformer = caffe.io.Transformer(
31 {in_: self.blobs[in_].data.shape})
AttributeError: 'Classifier' object has no attribute 'inputs'
'''
I have successfully compiled the caffe-windows(in spite of many warnings) and download the MNIST dataset from http://pan.baidu.com/s/1mgl9ndu and extract it to ./examples/mnist
, but when I run ./run_mnist.bat
, an error occured and I have to terminate the program, here is the log file that I found at ./log/INFO2015-08-28T17-17-10.txt
:
Log file created at: 2015/08/28 17:17:10
Running on machine: LAIEN-PC
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0828 17:17:10.843906 6232 caffe.cpp:112] Use GPU with device ID 0
I0828 17:17:11.421108 6232 caffe.cpp:120] Starting Optimization
I0828 17:17:11.421108 6232 solver.cpp:32] Initializing solver from parameters:
test_iter: 100
test_interval: 500
base_lr: 0.01
display: 100
max_iter: 10000
lr_policy: "inv"
gamma: 0.0001
power: 0.75
momentum: 0.9
weight_decay: 0.0005
snapshot: 5000
snapshot_prefix: "examples/mnist/lenet"
solver_mode: GPU
net: "examples/mnist/Mnist_demo_LeNet.prototxt"
I0828 17:17:11.421108 6232 solver.cpp:70] Creating training net from net file: examples/mnist/Mnist_demo_LeNet.prototxt
I0828 17:17:11.421108 6232 net.cpp:299] The NetState phase (0) differed from the phase (1) specified by a rule in layer mnist
I0828 17:17:11.421108 6232 net.cpp:299] The NetState phase (0) differed from the phase (1) specified by a rule in layer accuracy
I0828 17:17:11.421108 6232 net.cpp:42] Initializing net from parameters:
name: "LeNet"
state {
phase: TRAIN
}
layer {
name: "mnist"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
scale: 0.00390625
}
data_param {
source: "examples/mnist/mnist-train-leveldb"
batch_size: 64
backend: LEVELDB
}
}
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 20
kernel_size: 5
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "conv1_bn"
type: "BN"
bottom: "conv1"
top: "conv1_bn"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
bn_param {
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1_bn"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "conv2"
type: "Convolution"
bottom: "pool1"
top: "conv2"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
convolution_param {
num_output: 50
kernel_size: 5
stride: 1
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "conv2_bn"
type: "BN"
bottom: "conv2"
top: "conv2_bn"
param {
lr_mult: 1
decay_mult: 0
}
param {
lr_mult: 1
decay_mult: 0
}
bn_param {
scale_filler {
type: "constant"
value: 1
}
shift_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "pool2"
type: "Pooling"
bottom: "conv2_bn"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 2
stride: 2
}
}
layer {
name: "ip1"
type: "InnerProduct"
bottom: "pool2"
top: "ip1"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
inner_product_param {
num_output: 500
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "ip1"
top: "ip1"
}
layer {
name: "ip2"
type: "InnerProduct"
bottom: "ip1"
top: "ip2"
param {
lr_mult: 1
}
param {
lr_mult: 2
}
inner_product_param {
num_output: 10
weight_filler {
type: "xavier"
}
bias_filler {
type: "constant"
}
}
}
layer {
name: "loss"
type: "SoftmaxWithLoss"
bottom: "ip2"
bottom: "label"
top: "loss"
}
I0828 17:17:11.436707 6232 layer_factory.hpp:74] Creating layer mnist
I0828 17:17:11.436707 6232 net.cpp:90] Creating Layer mnist
I0828 17:17:11.436707 6232 net.cpp:380] mnist -> data
I0828 17:17:11.436707 6232 net.cpp:380] mnist -> label
I0828 17:17:11.452307 6232 net.cpp:120] Setting up mnist
I0828 17:17:11.467907 6232 db_leveldb.cpp:17] Opened leveldb examples/mnist/mnist-train-leveldb
I0828 17:17:11.483507 6232 data_layer.cpp:52] output data size: 64,1,28,28
I0828 17:17:11.483507 6232 net.cpp:127] Top shape: 64 1 28 28 (50176)
I0828 17:17:11.483507 6232 net.cpp:127] Top shape: 64 (64)
I0828 17:17:11.483507 6232 layer_factory.hpp:74] Creating layer conv1
I0828 17:17:11.483507 6232 net.cpp:90] Creating Layer conv1
I0828 17:17:11.483507 6232 net.cpp:422] conv1 <- data
I0828 17:17:11.483507 6232 net.cpp:380] conv1 -> conv1
I0828 17:17:11.483507 6232 net.cpp:120] Setting up conv1
F0828 17:17:11.561507 6232 cudnn_conv_layer.cpp:32] Check failed: status == CUDNN_STATUS_SUCCESS (6 vs. 0) CUDNN_STATUS_ARCH_MISMATCH
./3rdparty/
has been added to the system path.
As titled above, I encountered an issue that the input numbers were not correct when I trained the Siamese example on Windows8.1. According my investigation, it happened because of the definition on ContrastiveLossLayer in the file loss_layers.hpp and contrastive_loss_layer.cpp(.cu). For the first file, loss_layer.hpp, it rules the result the output of ExactNumBottomBlobs() for ContrastiveLossLyaer to be 4. However, the input for Siamese Mnist was 3 Blobs. So I was confused by the definition of your edition. Because I am a green , could you tell me why you revised the input Blob numbers from 4 to 3? Thanks for your sharing and reading.
1>....\tools\extract_features.cpp(55): error C2065: 'uint' : undeclared identifier
1> ....\tools\extract_features.cpp(28) : see reference to function template instantiation 'int feature_extraction_pipeline(int,char **)' being compiled
1>....\tools\extract_features.cpp(55): error C2146: syntax error : missing ';' before identifier 'device_id'
1>....\tools\extract_features.cpp(55): error C2065: 'device_id' : undeclared identifier
1>....\tools\extract_features.cpp(57): error C2065: 'device_id' : undeclared identifier
1>....\tools\extract_features.cpp(58): error C2065: 'device_id' : undeclared identifier
1>....\tools\extract_features.cpp(58): error C2512: 'google::CheckOpString' : no appropriate default constructor available
1>....\tools\extract_features.cpp(60): error C2065: 'device_id' : undeclared identifier
1>....\tools\extract_features.cpp(61): error C2065: 'device_id' : undeclared identifier
1>....\tools\extract_features.cpp(99): error C2872: 'shared_ptr' : ambiguous symbol
1> could be 'E:\caffe-master\3rdparty\include\boost/smart_ptr/shared_ptr.hpp(324) : boost::shared_ptr'
1> or 'D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(469) : std::shared_ptr'
1>....\tools\extract_features.cpp(123): error C2872: 'shared_ptr' : ambiguous symbol
1> could be 'E:\caffe-master\3rdparty\include\boost/smart_ptr/shared_ptr.hpp(324) : boost::shared_ptr'
1> or 'D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(469) : std::shared_ptr'
1>....\tools\extract_features.cpp(124): error C2872: 'shared_ptr' : ambiguous symbol
1> could be 'E:\caffe-master\3rdparty\include\boost/smart_ptr/shared_ptr.hpp(324) : boost::shared_ptr'
1> or 'D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(469) : std::shared_ptr'
1>....\tools\extract_features.cpp(128): error C2872: 'shared_ptr' : ambiguous symbol
1> could be 'E:\caffe-master\3rdparty\include\boost/smart_ptr/shared_ptr.hpp(324) : boost::shared_ptr'
1> or 'D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(469) : std::shared_ptr'
1>....\tools\extract_features.cpp(131): error C2872: 'shared_ptr' : ambiguous symbol
1> could be 'E:\caffe-master\3rdparty\include\boost/smart_ptr/shared_ptr.hpp(324) : boost::shared_ptr'
1> or 'D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(469) : std::shared_ptr'
1>....\tools\extract_features.cpp(145): error C2872: 'shared_ptr' : ambiguous symbol
1> could be 'E:\caffe-master\3rdparty\include\boost/smart_ptr/shared_ptr.hpp(324) : boost::shared_ptr'
1> or 'D:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\memory(469) : std::shared_ptr'
1>....\tools\extract_features.cpp(161): error C3861: 'snprintf': identifier not found
请问是我配置有问题还是这里需要修改某些地方???谢谢
Hi,
I am trying to create training data using the Caffe tools like convert_imagenet. Those are not built in the Caffe installation; however, there are .cpp files present. Do you have an experience of how to build them into executables?
Thankyou,
Joseph
I successfully built 'caffe_.mexw64' using your contributions with the following conditions: Visual Studio 2013 + Matlab 2014a + Windows 7. But, 'caffe_.mexw64' does not work and shows this message: 'Invalid Mex-file ~'. So I examined 'caffe_.mexw64' using 'Dependency Walker' and found some dlls are missing. I think that some dlls are dependent upon Internet Explorer or other Windows related things.
Could you tell me your environments? (Windows version, Internet Explorer version, etc.) Or please tell me a tip for Matlab wrapper.
Thank you in advance.
Hi Feng,
Line 205 in buildVS2013/caffelib/caffelib.vcxproj:
ClCompile Include="......\caffe\src\caffe\layers\lrn_layer.cpp"
The file path for lrn_layer.cpp is incorrect and generates an error during compilation.
The same issue is also at line 319 for the CUDA part.
The correct path should be ....\src\caffe\layers\lrn_layer.cpp
Can you please fix this?
cheers,
Edison
I'm a bit new to windows developing, but have to build caffe on my system. Your repo was chosen as the most appropriate to original for Linux.
I'm facing troubles with building it in MS Visual Studio 2012 on Windows 7 with you 3rdpatry directory and using MKL.
Errors are shown on attachment picture
Unresolved functions (external symbol):
vdSub vsSub vsPowx vdDiv vdAdd vsAbs cblas_saxpby vdExp vdAbs vsDiv vdMul vsAdd vsMul vsExp cblas_daxpby vsSqr vdPowx vdSqr
As i see there are declaration of these functions in "mkl_alternate.hpp", which are trying to be called from "math_functions.cpp"...but compiller can't find right library file from which to call these functions.
Can you help me? In what libraries I can find these func's? Would appreciate any help. Thanks.
Some users reported that the program would crash when using triplet loss.
Similar issue BVLC/caffe#2995 . It seems that the caffe_gpu_dot() is unproperly used.
I have merged another implementation of triplet loss. It uses gemv instead. I am out for business now. Can someone have a try and report the result to me?
整个项目编译成功,pycaffe我已经生成成功了,像OpenCv一样把_caffe.pyd复制放到python的文件目录C:\Python27_64bit\Lib\site-packages,就能运行了吗?
运行的时候有这个提示
import caffe
ImportError: dynamic module does not define init function (initcaffe).
python没怎么搞过..不知道怎么配置,谢谢 ^_^!
I think it should be:
if (static_cast(bottom[2]->cpu_data()[j])==static_cast(bottom[3]->cpu_data()[j]))
instead of
if (static_cast(bottom[2]->cpu_data()[j])==static_cast(bottom[2]->cpu_data()[j]))
Anyway, your .cu version is right! :)
Hi, Feng Wang
When I compile the caffe-windows in vs2013, the compiling fails with output information as follows:
bnll_layer.cu: line 27, error, missing ";" before identifier "CAFFE_GET_BLOCKS"
msb3271 error, "......" exit with code 2.
I suspect there is something wrong with my vs2013, but I try to reinstall it several times with different versions and still get the same error. Also, I cannot find anything valuable about cuda compilation. I would appreciate if you had any clue or suggestion.
The Siamese network example doesn't work because the ExactNumBotomBlobs()
for the ContrastiveLossLayer in loss_layers.hpp returns 4 instead of 3. Not sure why this has been changed since it is correct in Caffe's master branch.
Edit: I also had to update contrastive_loss.layer.cpp and contrastive_loss.layer.cu to the latest version in Caffe's master branch to make it work.
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.