Learning Rate Policy: stepIteration 0, Testing net (#0)Test net output #0: accuracy = 0.44782Test net output #1: loss = 0.720437 (* 1 = 0.720437 loss)Iteration 0, loss = nanTrain net output #0: loss = nan (* 1 = nan loss)Iteration 0, lr = 0Iteration 20, loss = nanTrain net output #0: loss = nan (* 1 = nan loss)Iteration 20, lr = 0
layers {name: "data"type: DATAtop: "data"top: "label"data_param {source: "examples/train_lmdb" // val_lmdb when test phasebackend: LMDBbatch_size: 50}transform_param {mean_file: "data/imagenet_mean.binaryproto"mirror: false}include: { phase: TRAIN }}
Thank you for the detailed reply!
For initialization, I use gaussian for weights and set bias to a constant 0. For nonlinearity, I just use maxout. The entire prototxt file is attached below. Will that be a problem due to improper initialization? I will also have a look for other possible reasons
name: "tp"
layers {
name: "data"
type: DATA
top: "data"
top: "label"
data_param {
source: "examples/tp/tp_train_lmdb"
backend: LMDB
batch_size: 50
}
transform_param {
mean_file: "data/tp/imagenet_mean.binaryproto"
mirror: false
}
include: { phase: TRAIN }
}
layers {
name: "data"
type: DATA
top: "data"
top: "label"
data_param {
source: "examples/tp/tp_val_lmdb"
backend: LMDB
batch_size: 50
}
transform_param {
mean_file: "data/tp/imagenet_mean.binaryproto"
mirror: false
}
include: { phase: TEST }
}
layers {
name: "conv1"
type: CONVOLUTION
bottom: "data"
top: "conv1"
blobs_lr: 1
blobs_lr: 2
weight_decay: 1
weight_decay: 0
convolution_param {
num_output: 96
kernel_size: 9
stride: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layers {
name: "slice1"
type: SLICE
bottom: "conv1"
top: "conv1_1"
top: "conv1_2"
slice_param {
slice_dim: 1
slice_point: 48
}
}
layers {
name: "maxout1"
type: ELTWISE
bottom: "conv1_1"
bottom: "conv1_2"
top: "maxout1"
eltwise_param {
operation: MAX
}
}
layers {
name: "drop1"
type: DROPOUT
bottom: "maxout1"
top: "maxout1"
dropout_param {
dropout_ratio: 1
}
}
layers {
name: "conv2"
type: CONVOLUTION
bottom: "maxout1"
top: "conv2"
blobs_lr: 1
blobs_lr: 2
weight_decay: 1
weight_decay: 0
convolution_param {
num_output: 128
kernel_size: 9
stride: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layers {
name: "slice2"
type: SLICE
bottom: "conv2"
top: "conv2_1"
top: "conv2_2"
slice_param {
slice_dim: 1
slice_point: 64
}
}
layers {
name: "maxout2"
type: ELTWISE
bottom: "conv2_1"
bottom: "conv2_2"
top: "maxout2"
eltwise_param {
operation: MAX
}
}
layers {
name: "drop2"
type: DROPOUT
bottom: "maxout2"
top: "maxout2"
dropout_param {
dropout_ratio: 0.5
}
}
layers {
name: "conv3"
type: CONVOLUTION
bottom: "maxout2"
top: "conv3"
blobs_lr: 1
blobs_lr: 2
weight_decay: 1
weight_decay: 0
convolution_param {
num_output: 512
kernel_size: 8
stride: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layers {
name: "slice3"
type: SLICE
bottom: "conv3"
top: "conv3_1"
top: "conv3_2"
top: "conv3_3"
top: "conv3_4"
slice_param {
slice_dim: 1
slice_point: 128
slice_point: 256
slice_point: 384
}
}
layers {
name: "maxout3_1"
type: ELTWISE
bottom: "conv3_1"
bottom: "conv3_2"
top: "maxout3_1"
eltwise_param {
operation: MAX
}
}
layers {
name: "maxout3_2"
type: ELTWISE
bottom: "conv3_3"
bottom: "conv3_4"
top: "maxout3_2"
eltwise_param {
operation: MAX
}
}
layers {
name: "maxout3"
type: ELTWISE
bottom: "maxout3_1"
bottom: "maxout3_2"
top: "maxout3"
eltwise_param {
operation: MAX
}
}
layers {
name: "drop3"
type: DROPOUT
bottom: "maxout3"
top: "maxout3"
dropout_param {
dropout_ratio: 0.5
}
}
layers {
name: "conv4"
type: CONVOLUTION
bottom: "maxout3"
top: "conv4"
blobs_lr: 1
blobs_lr: 2
weight_decay: 1
weight_decay: 0
convolution_param {
num_output: 8
kernel_size: 1
stride: 1
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layers {
name: "slice4"
type: SLICE
bottom: "conv4"
top: "conv4_1"
top: "conv4_2"
top: "conv4_3"
top: "conv4_4"
slice_param {
slice_dim: 1
slice_point: 2
slice_point: 4
slice_point: 6
}
}
layers {
name: "maxout4_1"
type: ELTWISE
bottom: "conv4_1"
bottom: "conv4_2"
top: "maxout4_1"
eltwise_param {
operation: MAX
}
}
layers {
name: "maxout4_2"
type: ELTWISE
bottom: "conv4_3"
bottom: "conv4_4"
top: "maxout4_2"
eltwise_param {
operation: MAX
}
}
layers {
name: "maxout4"
type: ELTWISE
bottom: "maxout4_1"
bottom: "maxout4_2"
top: "maxout4"
eltwise_param {
operation: MAX
}
}
layers {
name: "drop4"
type: DROPOUT
bottom: "maxout4"
top: "maxout4"
dropout_param {
dropout_ratio: 0.5
}
}
layers {
name: "accuracy"
type: ACCURACY
bottom: "maxout4"
bottom: "label"
top: "accuracy"
include: { phase: TEST }
}
layers {
name: "loss"
type: SOFTMAX_LOSS
bottom: "maxout4"
bottom: "label"
top: "loss"
}
Best,
Xiao
could you attach the entire train_test.prototxt?
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/6e93b7fd-83c0-42c7-9120-2496a0375c90%40googlegroups.com.--
You received this message because you are subscribed to a topic in the Google Groups "Caffe Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/caffe-users/LVfttqqMN1M/unsubscribe.
To unsubscribe from this group and all its topics, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
#this line extract conv1 and conv2 data
res = net.forward(blobs = ['conv1','conv2'], data = im_batch)
about relevant papers i can recommend you on 3
http://jmlr.org/proceedings/papers/v9/glorot10a/glorot10a.pdf
http://arxiv.org/pdf/1502.01852.pdf
http://arxiv.org/pdf/1502.03167v2.pdf
And ofcorse Hugo Larochelleyoutube channel
https://www.youtube.com/channel/UCiDouKcxRmAdc5OeZdiRwAg
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/67c8e232-b676-461b-96ea-2250c8063f1e%40googlegroups.com.
Besides, actually my question is that how to initialize a net instance without providing *.caffemodel file, because after that I can call net.forward function. Or maybe I can just take a snapshot after a few iterations and then use the saved *.caffemodel?
--
You received this message because you are subscribed to the Google Groups "Caffe Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to caffe-users...@googlegroups.com.
To post to this group, send email to caffe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/caffe-users/abb36b65-55e3-4329-ab8d-3b2282ad2202%40googlegroups.com.