Giter Site home page Giter Site logo

happynear / caffe-windows Goto Github PK

View Code? Open in Web Editor NEW
1.3K 113.0 650.0 39.01 MB

Configure Caffe in one hour for Windows users.

License: Other

CMake 2.36% Makefile 0.55% C++ 76.83% Shell 0.48% Python 7.58% MATLAB 1.03% Cuda 11.08% Batchfile 0.08% PowerShell 0.01% C 0.01% Objective-C 0.01%

caffe-windows's Introduction

Caffe

License

Caffe is a deep learning framework made with expression, speed, and modularity in mind. It is developed by Berkeley AI Research (BAIR)/The Berkeley Vision and Learning Center (BVLC) and community contributors.

Check out the project site for all the details like

and step-by-step examples.

Windows Setup

Requirements: Visual Studio 2015, CUDA 9.0, third party libraries: Baidu Yun or Google Drive. Please extract the archive into ./windows/thirdparty/. Then, add the folder ./windows/thirdparty/bins to the environment variable PATH.

Pre-Build Steps

Copy .\windows\CommonSettings.props.example to .\windows\CommonSettings.props

By defaults Windows build requires CUDA and cuDNN libraries. Both can be disabled by adjusting build variables in .\windows\CommonSettings.props. Python support is disabled by default, but can be enabled via .\windows\CommonSettings.props as well.

CUDA

Download CUDA Toolkit 8.0 from nVidia website. If you don't have CUDA installed, you can experiment with CPU_ONLY build. In .\windows\CommonSettings.props set CpuOnlyBuild to true and set UseCuDNN & UseNCCL to false.

cuDNN

Download cuDNN v5 from nVidia website. Unpack downloaded zip to %CUDA_PATH% (environment variable set by CUDA installer). Alternatively, you can unpack zip to any location and set CuDnnPath to point to this location in .\windows\CommonSettings.props. CuDnnPath defined in .\windows\CommonSettings.props. Also, you can disable cuDNN by setting UseCuDNN to false in the property file.

Python

To build Caffe Python wrapper set PythonSupport to true in .\windows\CommonSettings.props. Download Miniconda 2.7 64-bit Windows installer [from Miniconda website] (http://conda.pydata.org/miniconda.html). Install for all users and add Python to PATH (through installer).

Run the following commands from elevated command prompt:

conda install --yes numpy scipy matplotlib scikit-image pip
pip install protobuf

Remark

After you have built solution with Python support, in order to use it you have to either:

  • set PythonPath environment variable to point to <caffe_root>\Build\x64\Release\pycaffe, or
  • copy folder <caffe_root>\Build\x64\Release\pycaffe\caffe under <python_root>\lib\site-packages.

Matlab

To build Caffe Matlab wrapper set MatlabSupport to true and MatlabDir to the root of your Matlab installation in .\windows\CommonSettings.props.

Remark

After you have built solution with Matlab support, in order to use it you have to add the ./matlab folder to Matlab search path.

Build

Now, you should be able to build .\windows\Caffe.sln

License and Citation

Caffe is released under the BSD 2-Clause license. The BAIR/BVLC reference models are released for unrestricted use.

Please cite Caffe in your publications if it helps your research:

@article{jia2014caffe,
  Author = {Jia, Yangqing and Shelhamer, Evan and Donahue, Jeff and Karayev, Sergey and Long, Jonathan and Girshick, Ross and Guadarrama, Sergio and Darrell, Trevor},
  Journal = {arXiv preprint arXiv:1408.5093},
  Title = {Caffe: Convolutional Architecture for Fast Feature Embedding},
  Year = {2014}
}

caffe-windows's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

caffe-windows's Issues

Example of using the transformer layer

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

i finished install caffe and python interface, but i failed to load a pretrained caffe model.

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'

'''

Classification example

Hi, I want to use the cpp_classification example, but I have some issues

  1. I compiled caffe and caffelib project in visual studio, but classificaiton.bin is not automatically build.

  2. 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 )

  1. I don't have a folder named : data

build missing _caffe.so or _caffe.dll

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.

16 bit image tiff format

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

caffe-windows-debug

The debug version of caffe-windows seems not to work, could you check it?

_MSC_VER value mismatch

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

no attribute ImageNetClassifier

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.

CUDA 6.5

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.

hdf5_hl.dll missing

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!

Compiling Caffe functions

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

Is that right in the file contrastive_loss_layer.cpp ?

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?

将图片转换成leveldb格式问题

前辈,我已经按照您的方法编译出来了 第三步的测试文件也能正常运行 然后我想跑自己的数据,编译了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目录里面的附加依赖库里面添加?

Problem while runing `./run_mnist.bat`

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.

Running Faster-RCNN using this branch on Windows

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.)

Use of Matlab Wrapper

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

matlab wrapper error

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

编译extract_features错误

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

请问是我配置有问题还是这里需要修改某些地方???谢谢

gram_layer.cpp is absent

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?

caffe for FCN

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);,....

memory leak

It seems that this version of Caffe encounters severe memory leak, the memory can be up to > 100GB, will you fix this.

mnist error

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

CPU Mode on classification example

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?

caffe_.mexw64': The specified module could not be found.

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();

smoothL1loss

Hi
Please help me, I can't use smoothL1Loss to implement Fast r-cnn

googlenet for FaceVerification

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

怎么在python下调用caffe啊

整个项目编译成功,pycaffe我已经生成成功了,像OpenCv一样把_caffe.pyd复制放到python的文件目录C:\Python27_64bit\Lib\site-packages,就能运行了吗?

运行的时候有这个提示
import caffe
ImportError: dynamic module does not define init function (initcaffe).

python没怎么搞过..不知道怎么配置,谢谢 ^_^!

Preparing my own data for Caffe

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

lrn_layer.cpp incorrect path in caffelib.vcxproj

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

failed to run the run_mnist.bat

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!

gpu+cuDNN slower than gpu only on my data and networks

@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!

Python wrapper problem

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

math_functions.cpp

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
ms_vs_caffe

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.

Error in Matlab wrapper

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.

.sh files and docs

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

Contrastive loss layer bug

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.

CovarianceLayer Backward incorrect

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

linux version

Hi~, I would like to know if this caffe has linux version. Thanks a lot ^^

In python, "from caffe import layers as L" does not work

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?

vs2013 compiling error

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.

filler.hpp编译错误

感谢你无私的分享,我是个菜鸟,在编译您的工程时报错,在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

Triplet loss test

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?

Error occurred when I trained the Siamese example for numbers of input Blob

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.

Please check Line 71 of contrastive_loss.cpp

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! :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.