pycaffe

Caffe installation in ubuntu 17.04: Import Error: /usr/lib/libgdal.so.20: undefined symbol: sqlite3_column_table_name

♀尐吖头ヾ 提交于 2019-12-25 09:36:36
问题 After install caffe in conda virtual environment with Python 3.5 I am getting this error on importing caffe Traceback (most recent call last): File "", line 1, in File "/var/caffe-master/python/caffe/ init .py", line 1, in from .pycaffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, RMSPropSolver, AdaDeltaSolver, AdamSolver, NCCL, Timer File "/var/caffe-master/python/caffe/pycaffe.py", line 13, in from ._caffe import Net, SGDSolver, NesterovSolver, AdaGradSolver, \ ImportError: /usr

Build caffe\Pycaffe on windows using Visual Studio--error?

岁酱吖の 提交于 2019-12-25 02:53:54
问题 I am trying to build caffe (libcaffe,pycaffe) on windows using Visual studio. I downloaded the caffe-master project from below link Caffe for windows using visual studio 2015 and open the solution caffe in it. enabled python support true to build some nuget-packages were missing so restore them. for this followed the link How to install caffe in windows in five minutes try to build the project but getting following errors: C2059 syntax error: 'constant' (compiling source file ..\..\src\caffe

Run Python script from Java

China☆狼群 提交于 2019-12-24 14:56:46
问题 I am trying to run .py script in Java, but when I run the java code it doesn't show any output. What I am doing wrong? I tried with: ArrayList<String> command = new ArrayList<String>(); //xterm will be launched, if platform is Linux. command.add("xterm"); command.add("-c"); command.add("python"); command.add("/home/clef/Escritorio/use_archive.py"); command.add("/home/clef/classification/STOP_WORDS.tar.gz"); command.add("/home/clef/Escritorio/Prueba_linea/000006/6.jpg"); command.add(" > ~

how to write caffe python layer with trainable parameters?

蓝咒 提交于 2019-12-24 13:37:24
问题 I want to learn how to write caffe python layers. But I only find examples about very simple layers like pyloss. How to write python caffe with trainable parameters? For example, how to write a fully connected python layer? 回答1: Caffe stores the layer's trainable parameters as a vector of blobs . By default this vector is empty and it is up to you to add parameters blobs to it in the setup of the layer. There is a simple example for a layer with parameters in test_python_layer.py. See this

Write jpeg file directly to lmdb [closed]

纵饮孤独 提交于 2019-12-24 06:07:39
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . I managed to write numpy arrays to lmdb, howewer solution is far from perfection, but actually my X is just jpg image, so my question is how to directly write jpeg file to lmdb? Seems like pycaffe doing similar thing but it use caffe specific Datum and I need some general solution

RMSprop, Adam, AdaDelta test accuracy does not improve using Caffe

左心房为你撑大大i 提交于 2019-12-23 09:38:04
问题 I am finetuning using Caffe on an image dataset on a Tesla K40 . Using a batch size=47 , solver_type=SGD , base_lr=0.001 , lr_policy="step" , momentum=0.9 , gamma=0.1 , the training loss decreases and test accuracy goes from 2%-50% in 100 iterations which is quite good. When using other optimisers such as RMSPROP , ADAM and ADADELTA , the training loss remains almost the same even and no improvement in test accuracy after 1000 iterations. For RMSPROP , I have changed the respective parameters

Net surgery: How to reshape a convolution layer of a caffemodel file in caffe?

☆樱花仙子☆ 提交于 2019-12-22 09:48:08
问题 I'm trying to reshape the size of a convolution layer of a caffemodel (This is a follow-up question to this question). Although there is a tutorial on how to do net surgery, it only shows how to copy weight parameters from one caffemodel to another of the same size. Instead I need to add a new channel (all 0) to my convolution filter such that it changes its size from currently ( 64 x 3 x 3 x 3 ) to ( 64 x 4 x 3 x 3 ). Say the convolution layer is called 'conv1' . This is what I tried so far:

Extracting weights from .caffemodel without caffe installed in Python

£可爱£侵袭症+ 提交于 2019-12-21 05:46:07
问题 Is there a relatively simple way to extract weights in Python from one of the many pretrained models in Caffe Zoo WITHOUT CAFFE (nor pyCaffe)? i.e. parsing .caffemodel to hdf5/numpy or whatever format that can be read by Python? All the answers I found use C++ code with caffe classes or Pycaffe. I have looked at pycaffe's code it looks like you really need caffe to make sense of the binary is that the only solution? 回答1: I had to resolve that exact issue just now. Assuming you have a

How reconstruct the caffe net by using pycaffe

可紊 提交于 2019-12-21 05:05:00
问题 What I want is, After loading a net, I will decompose some certain layers and save the new net. For example Orignial net: data -> conv1 -> conv2 -> fc1 -> fc2 -> softmax; New net: data -> conv1_1 -> conv1_2 -> conv2_1 -> conv2_2 -> fc1 -> fc2 -> softmax Therefore, during this process, I stuck in the following situation: 1. How to new a certain layer with specified layer parameters in pycaffe ? 2. How to copy the layer parameters from existing layers(such as fc1 and fc2 above)? I know by using

Exception: “dot” not found in path in python on mac

女生的网名这么多〃 提交于 2019-12-20 14:15:14
问题 I want to use caffe.draw to draw the caffe net by anaconda python on mac. But I got the error like this: File "python/draw_net.py", line 45, in <module> main() File "python/draw_net.py", line 41, in main caffe.draw.draw_net_to_file(net, args.output_image_file, args.rankdir) File "/Users/xxh/caffe/distribute/python/caffe/draw.py", line 222, in draw_net_to_file fid.write(draw_net(caffe_net, rankdir, ext)) File "/Users/xxh/caffe/distribute/python/caffe/draw.py", line 204, in draw_net return get