Skip to content

Instantly share code, notes, and snippets.

@melvincabatuan
Created May 30, 2015 10:55
Show Gist options
  • Save melvincabatuan/3907bfab07df6e2fb8d4 to your computer and use it in GitHub Desktop.
Save melvincabatuan/3907bfab07df6e2fb8d4 to your computer and use it in GitHub Desktop.
Caffe Segmentation fault
[root@cobalt googlenet_places205]# cd ..
[root@cobalt models]# caffe train -solver $SOLVER_PROTO -weights $INITIAL_WEIGHTS
caffe: /root/anaconda/lib/libtiff.so.5: no version information available (required by /usr/local/lib/libopencv_imgcodecs.so.3.0)
F0530 17:51:00.062386 8965 io.cpp:34] Check failed: fd != -1 (-1 vs. -1) File not found: models/unary_depth_regressor/solver_softmax_dir.prototxt
*** Check failure stack trace: ***
@ 0x7f37ddd20e6d (unknown)
@ 0x7f37ddd22ced (unknown)
@ 0x7f37ddd20a5c (unknown)
@ 0x7f37ddd2363e (unknown)
@ 0x7f37e202ca3d caffe::ReadProtoFromTextFile()
@ 0x407182 train()
@ 0x405871 main
@ 0x7f37d90b0af5 __libc_start_main
@ 0x405e1d (unknown)
Aborted
[root@cobalt models]# cd ..
[root@cobalt DepthPrediction]# caffe train -solver $SOLVER_PROTO -weights $INITIAL_WEIGHTS
caffe: /root/anaconda/lib/libtiff.so.5: no version information available (required by /usr/local/lib/libopencv_imgcodecs.so.3.0)
I0530 17:51:37.176177 8972 caffe.cpp:117] Use CPU.
I0530 17:51:37.176739 8972 caffe.cpp:121] Starting Optimization
I0530 17:51:37.176849 8972 solver.cpp:32] Initializing solver from parameters:
test_iter: 100
test_interval: 1000
base_lr: 0.001
display: 20
max_iter: 40000
lr_policy: "step"
gamma: 0.5
momentum: 0.9
weight_decay: 0.0005
stepsize: 5000
snapshot: 1000
snapshot_prefix: "models/unary_depth_regressor/snapshots_softmax/softmax_centerdepth"
solver_mode: CPU
net: "models/unary_depth_regressor/udr_softmax_dir.prototxt"
I0530 17:51:37.176964 8972 solver.cpp:70] Creating training net from net file: models/unary_depth_regressor/udr_softmax_dir.prototxt
E0530 17:51:37.177558 8972 upgrade_proto.cpp:618] Attempting to upgrade input file specified using deprecated V1LayerParameter: models/unary_depth_regressor/udr_softmax_dir.prototxt
I0530 17:51:37.190326 8972 upgrade_proto.cpp:626] Successfully upgraded file specified using deprecated V1LayerParameter
I0530 17:51:37.190466 8972 net.cpp:287] The NetState phase (0) differed from the phase (1) specified by a rule in layer data
I0530 17:51:37.190524 8972 net.cpp:287] The NetState phase (0) differed from the phase (1) specified by a rule in layer accuracy
I0530 17:51:37.190803 8972 net.cpp:42] Initializing net from parameters:
name: "Unary depth regressor, softmax version: directory input. Center depth values:"
state {
phase: TRAIN
}
layer {
name: "data"
type: "ImageData"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
mean_file: "train/NYUv2/train_full_167_v3/mean.binaryproto"
}
image_data_param {
source: "train/NYUv2/train_full_167_v3/index_16_norm_randomized.txt"
batch_size: 128
shuffle: true
new_height: 227
new_width: 227
}
}
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
top: "conv1"
param {
lr_mult: 0
decay_mult: 1
}
param {
lr_mult: 0
decay_mult: 0
}
convolution_param {
num_output: 96
kernel_size: 11
stride: 4
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "relu1"
type: "ReLU"
bottom: "conv1"
top: "conv1"
}
layer {
name: "pool1"
type: "Pooling"
bottom: "conv1"
top: "pool1"
pooling_param {
pool: MAX
kernel_size: 3
stride: 2
}
}
layer {
name: "norm1"
type: "LRN"
bottom: "pool1"
top: "norm1"
lrn_param {
local_size: 5
alpha: 0.0001
beta: 0.75
}
}
layer {
name: "conv2"
type: "Convolution"
bottom: "norm1"
top: "conv2"
param {
lr_mult: 0
}
param {
lr_mult: 0
}
convolution_param {
num_output: 256
pad: 2
kernel_size: 5
group: 2
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 1
}
}
}
layer {
name: "relu2"
type: "ReLU"
bottom: "conv2"
top: "conv2"
}
layer {
name: "pool2"
type: "Pooling"
bottom: "conv2"
top: "pool2"
pooling_param {
pool: MAX
kernel_size: 3
stride: 2
}
}
layer {
name: "norm2"
type: "LRN"
bottom: "pool2"
top: "norm2"
lrn_param {
local_size: 5
alpha: 0.0001
beta: 0.75
}
}
layer {
name: "conv3"
type: "Convolution"
bottom: "norm2"
top: "conv3"
param {
lr_mult: 0
}
param {
lr_mult: 0
}
convolution_param {
num_output: 384
pad: 1
kernel_size: 3
}
}
layer {
name: "relu3"
type: "ReLU"
bottom: "conv3"
top: "conv3"
}
layer {
name: "conv4"
type: "Convolution"
bottom: "conv3"
top: "conv4"
param {
lr_mult: 0
}
param {
lr_mult: 0
}
convolution_param {
num_output: 384
pad: 1
kernel_size: 3
group: 2
}
}
layer {
name: "relu4"
type: "ReLU"
bottom: "conv4"
top: "conv4"
}
layer {
name: "conv5"
type: "Convolution"
bottom: "conv4"
top: "conv5"
param {
lr_mult: 0
}
param {
lr_mult: 0
}
convolution_param {
num_output: 256
pad: 1
kernel_size: 3
group: 2
}
}
layer {
name: "relu5"
type: "ReLU"
bottom: "conv5"
top: "conv5"
}
layer {
name: "pool5"
type: "Pooling"
bottom: "conv5"
top: "pool5"
pooling_param {
pool: MAX
kernel_size: 3
stride: 2
}
}
layer {
name: "fc6"
type: "InnerProduct"
bottom: "pool5"
top: "fc6"
param {
lr_mult: 0
}
param {
lr_mult: 0
}
inner_product_param {
num_output: 4096
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "relu6"
type: "ReLU"
bottom: "fc6"
top: "fc6"
}
layer {
name: "drop6"
type: "Dropout"
bottom: "fc6"
top: "fc6"
dropout_param {
dropout_ratio: 0.5
}
}
layer {
name: "fc7"
type: "InnerProduct"
bottom: "fc6"
top: "fc7"
param {
lr_mult: 1
}
param {
lr_mult: 1
}
inner_product_param {
num_output: 4096
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "relu7"
type: "ReLU"
bottom: "fc7"
top: "fc7"
}
layer {
name: "drop7"
type: "Dropout"
bottom: "fc7"
top: "fc7"
dropout_param {
dropout_ratio: 0.5
}
}
layer {
name: "fc_n1"
type: "InnerProduct"
bottom: "fc7"
top: "fc_n1"
param {
lr_mult: 1
}
param {
lr_mult: 1
}
inner_product_param {
num_output: 128
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "relu_n1"
type: "ReLU"
bottom: "fc_n1"
top: "fc_n1"
}
layer {
name: "drop_n1"
type: "Dropout"
bottom: "fc_n1"
top: "fc_n1"
dropout_param {
dropout_ratio: 0.5
}
}
layer {
name: "fc_n2"
type: "InnerProduct"
bottom: "fc_n1"
top: "fc_n2"
param {
lr_mult: 1
}
param {
lr_mult: 1
}
inner_product_param {
num_output: 16
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "prob"
type: "SoftmaxWithLoss"
bottom: "fc_n2"
bottom: "label"
top: "prob"
}
I0530 17:51:37.193035 8972 layer_factory.hpp:74] Creating layer data
I0530 17:51:37.193068 8972 net.cpp:90] Creating Layer data
I0530 17:51:37.193087 8972 net.cpp:368] data -> data
I0530 17:51:37.193122 8972 net.cpp:368] data -> label
I0530 17:51:37.193150 8972 net.cpp:120] Setting up data
I0530 17:51:37.193169 8972 image_data_layer.cpp:36] Opening file train/NYUv2/train_full_167_v3/index_16_norm_randomized.txt
I0530 17:51:37.206234 8972 image_data_layer.cpp:46] Shuffling data
I0530 17:51:37.206730 8972 image_data_layer.cpp:51] A total of 0 images.
*** Aborted at 1432979497 (unix time) try "date -d @1432979497" if you are using GNU date ***
PC: @ 0x7fc81cb2a9b0 (unknown)
*** SIGSEGV (@0x0) received by PID 8972 (TID 0x7fc822d10940) from PID 0; stack trace: ***
@ 0x7fc819d75130 (unknown)
@ 0x7fc81cb2a9b0 (unknown)
@ 0x7fc8228ccf3c std::operator+<>()
@ 0x7fc8228cd905 caffe::ImageDataLayer<>::DataLayerSetUp()
@ 0x7fc8228fced6 caffe::BaseDataLayer<>::LayerSetUp()
@ 0x7fc8228fcfd9 caffe::BasePrefetchingDataLayer<>::LayerSetUp()
@ 0x7fc82296cea3 caffe::Net<>::Init()
@ 0x7fc82296ec12 caffe::Net<>::Net()
@ 0x7fc822979b80 caffe::Solver<>::InitTrainNet()
@ 0x7fc82297ab23 caffe::Solver<>::Init()
@ 0x7fc82297acf6 caffe::Solver<>::Solver()
@ 0x40d250 caffe::GetSolver<>()
@ 0x407243 train()
@ 0x405871 main
@ 0x7fc8199c6af5 __libc_start_main
@ 0x405e1d (unknown)
Segmentation fault
[root@cobalt DepthPrediction]#
@asanakoy
Copy link

asanakoy commented Nov 4, 2015

That my be helpful for people who will land here in future.
I had kind of the same problem, but I was loading images from leveldb file.
And this error appeared when I copied leveldb files generated on machine A to another machine B and tried to run caffe on B.
When I regenerated leveldb once again on the machine B, problem was solved.
BTW. may be anybody knows why does the machine on which was leveldb generated matter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment