caffe

How to generate a sentence from feature vector or words?

二次信任 提交于 2019-12-05 10:17:27
I used VGG 16-Layer Caffe model for image captions and I have several captions per image. Now, I want to generate a sentence from those captions (words). I read in a paper on LSTM that I should remove the SoftMax layer from the training network and provide the 4096 feature vector from fc7 layer directly to LSTM. I am new to LSTM and RNN stuff. Where should I begin? Is there any tutorial showing how to generate sentence by sequence labeling? AFAIK the master branch of BVLC/caffe does not yet support a recurrent layer architecture. You should pull branch recurrent from jeffdonahue/caffe . This

Changing the solver parameters in Caffe through pycaffe

时光总嘲笑我的痴心妄想 提交于 2019-12-05 08:06:15
How can I change the solver parameter in Caffe through pycaffe? E.g. right after calling solver = caffe.get_solver(solver_prototxt_filename) I would like to change the solver's parameters (learning rate, stepsize, gamma, momentum, base_lr, power, etc.), without having to change solver_prototxt_filename . Maybe you can create a temporary file. First of all, load your solver parameters with from caffe.proto import caffe_pb2 from google.protobuf import text_format solver_config = caffe_pb2.SolverParameter() with open('/your/solver/path') as f: text_format.Merge(str(f.read()), solver_config) You

What is average_loss field in Caffe solver for?

陌路散爱 提交于 2019-12-05 07:42:34
What is the use for average_loss ? Would someone please give an example of it or explain it in layman's terms? You can check in the caffe.proto file. Line 151 in the present version gives the following comment for average_loss: Display the loss averaged over the last average_loss iterations 来源: https://stackoverflow.com/questions/40190377/what-is-average-loss-field-in-caffe-solver-for

Multiple pretrained networks in Caffe

会有一股神秘感。 提交于 2019-12-05 05:43:45
Is there a simple way (e.g. without modifying caffe code) to load wights from multiple pretrained networks into one network? The network contains some layers with same dimensions and names as both pretrained networks. I am trying to achieve this using NVidia DIGITS and Caffe. EDIT : I thought it wouldn't be possible to do it directly from DIGITS, as confirmed by answers. Can anyone suggest a simple way to modify the DIGITS code to be able to select multiple pretrained networks? I checked the code a bit, and thought the training script would be a good place to start, but I don't have in-depth

编译安装caffe遇到过的一些问题

左心房为你撑大大i 提交于 2019-12-05 03:51:39
1、 ./include/caffe/common.hpp:5:27: fatal error: gflags/gflags.h: No such file or directory 解决办法:sudo apt-get install libgflags-dev 2、 ./include/caffe/util/mkl_alternate.hpp:14:19: fatal error: cblas.h: No such file or directory 解决办法:sudo apt-get install libblas-dev 3、 ./include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory 解决办法:在Makefile.config找到以下行并添加蓝色部分 INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial 4、 ./include/caffe/util/db_lmdb.hpp:8:18:

使用TensorRT对caffe和pytorch onnx模型进行fp32和fp16推理

老子叫甜甜 提交于 2019-12-05 01:52:09
本文首发于个人博客 https://kezunlin.me/post/bcdfb73c/ ,欢迎阅读最新内容! tensorrt fp32 fp16 tutorial with caffe pytorch minist model Series Part 1: install and configure tensorrt 4 on ubuntu 16.04 Part 2: tensorrt fp32 fp16 tutorial Part 3: tensorrt int8 tutorial Code Example include headers #include <assert.h> #include <sys/stat.h> #include <time.h> #include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <cmath> #include <algorithm> #include <cuda_runtime_api.h> #include "NvCaffeParser.h" #include "NvOnnxConfig.h" #include "NvOnnxParser.h" #include "NvInfer.h" #include "common.h"

Where is layer module defined in PyCaffe

那年仲夏 提交于 2019-12-05 01:13:34
问题 I am modifying a Caffe tutorial to implement a neural network, but I am struggling to identify where some of the pycaffe modules are location in order to see certain function definitions. For example, the tutorial mentions: import caffe from caffe import layers a L, params as P .... L.Convolution(bottom, kernel_size=ks, stride=stride, num_output=nout, pad=pad, group=group) L.InnerProduct(bottom, num_output=nout) L.ReLU(fc, in_place=True) ... Where can I find these function definitions and

ImportError cannot import name BytesIO when import caffe on ubuntu

前提是你 提交于 2019-12-04 23:04:44
问题 I am trying to make caffe running on my machine equipped with Ubuntu 12.04LTS. After finishing all the steps on the Installation page, I trained the LeNet model successfully and tried to use it as the tutorial from here. Then I got the following error: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named caffe Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/apport_python_hook.py", line 66, in

caffe:AttributeError: 'module' object has no attribute 'LabelMap'

纵饮孤独 提交于 2019-12-04 22:54:46
The caffe is installed on the Ubuntu server,and it test is ok. I just run the following code on the Ubutun(16.04) cloud server: import caffe from caffe.proto import caffe_pb2 label_map = caffe_pb2.LabelMap() and I have run the command as following which provided by the internet, but there is still error: command: export PYTHONPATH=$/home2/challenge98/caffe/python:$PYTHONPATH error: Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'LabelMap' Could you guys give me some advices how to solve it. Thanks! tktktk0711 Should

deep learning - a number of naive questions about caffe

╄→гoц情女王★ 提交于 2019-12-04 21:14:35
问题 I am trying to understand the basics of caffe, in particular to use with python. My understanding is that the model definition (say a given neural net architecture) must be included in the '.prototxt' file. And that when you train the model on data using the '.prototxt' , you save the weights/model parameters to a '.caffemodel' file Also, there is a difference between the '.prototxt' file used for training (which includes learning rate and regularization parameters) and the one used for