Hi,
I'm training to train a net to performs classification of two properties from the same images. For example - age and gender. I have 8 classes of age and 2 classes of gender.
I would like that the net would predict both properties from the input image.
I'm getting the following error when trying to train: "Duplicate blobs produced by multiple sources."
I would really appreciate some advice, as I'm quite stuck and not sure how to solve it.
I have tried to define the val_train_prototxt file as follows:
layers {
name: "data"
type: DATA
top: "data"
top: "label_age"
data_param {
source: "age_train_leveldb"
mean_file: "mean.binaryproto"
batch_size: 50
crop_size: 227
mirror: true
}
include: { phase: TRAIN }
}
layers {
name: "data"
type: DATA
top: "data"
top: "label_age"
data_param {
source: "age_val_leveldb"
mean_file: "mean.binaryproto"
batch_size: 50
crop_size: 227
mirror: false
}
include: { phase: TEST }
}
layers {
name: "data"
type: DATA
top: "data"
top: "label_gender"
data_param {
source: "gender_train_leveldb"
mean_file: "mean.binaryproto"
batch_size: 50
crop_size: 227
mirror: true
}
include: { phase: TRAIN }
}
layers {
name: "data"
type: DATA
top: "data"
top: "label_gender"
data_param {
source: "gender_val_leveldb"
mean_file: "mean.binaryproto"
batch_size: 50
crop_size: 227
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: 11
stride: 4
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
A LOT OF CONV, POOL and NORM LAYERS
layers {
name: "fc8_age"
type: INNER_PRODUCT
bottom: "fc7"
top: "fc8_age"
blobs_lr: 10
blobs_lr: 20
weight_decay: 1
weight_decay: 0
inner_product_param {
num_output: 8
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layers {
name: "fc8_gender"
type: INNER_PRODUCT
bottom: "fc7"
top: "fc8_gender"
blobs_lr: 10
blobs_lr: 20
weight_decay: 1
weight_decay: 0
inner_product_param {
num_output: 2
weight_filler {
type: "gaussian"
std: 0.01
}
bias_filler {
type: "constant"
value: 0
}
}
}
layers {
name: "loss"
type: SOFTMAX_LOSS
bottom: "fc8_age"
bottom: "label_age"
}
layers {
name: "accuracy"
type: ACCURACY
bottom: "fc8_age"
bottom: "label_age"
top: "accuracy"
include: { phase: TEST }
}
layers {
name: "loss"
type: SOFTMAX_LOSS
bottom: "fc8_gender"
bottom: "label_gender"
}
layers {
name: "accuracy"
type: ACCURACY
bottom: "fc8_gender"
bottom: "label_gender"
top: "accuracy"
include: { phase: TEST }
}